ORACLE数据库:
FLOOR(MONTHS_BETWEEN(SYSDATE,出生日期)/12) KINGBASE数据库:
DATEDIFF(MONTH,出生日期,CURRENT_TIMESTAMP)/12 DB2数据库:
TIMESTAMPDIFF(64,CHAR(CURRENT DATE - TIMESTAMP(出生日期)))/12
2022-10-24 16:10:58
ORACLE数据库:
FLOOR(MONTHS_BETWEEN(SYSDATE,出生日期)/12) KINGBASE数据库:
DATEDIFF(MONTH,出生日期,CURRENT_TIMESTAMP)/12 DB2数据库:
TIMESTAMPDIFF(64,CHAR(CURRENT DATE - TIMESTAMP(出生日期)))/12