ORACLE数据库: FLOOR(MONTHS_BETWEEN(SYSDATE,出生日期)/12) KINGBASE数据库: DATEDIFF(MONTH,出生日期,CURRENT_TIMESTAMP)/12 DB2数据库: TIMESTAMPDIFF(64,CHAR(CURRENT DATE - TIMESTAMP(出生日期)))/12
时间: 2024-11-09 23:59:46
ORACLE数据库: FLOOR(MONTHS_BETWEEN(SYSDATE,出生日期)/12) KINGBASE数据库: DATEDIFF(MONTH,出生日期,CURRENT_TIMESTAMP)/12 DB2数据库: TIMESTAMPDIFF(64,CHAR(CURRENT DATE - TIMESTAMP(出生日期)))/12