方法一: SELECT TRUNC(months_between(sysdate, birth)/12) AS age from mytable 方法二: select TRUNC((to_char(sysdate, 'yyyyMMdd') - to_char(birth, 'yyyyMMdd')) / 10000) as age from mytable 注:sysdate 为系统日期时间,birth 为表中出生日期字段 作者:itmyhome…
SELECT FLOOR(MONTHS_BETWEEN(SYSDATE,birthday)/12,1) FROM ltteacherinfo where name='朱雪东111'这个报错ORA 00909 :invalid number of arguments这个是怎么错了,计算年龄该怎么算,年龄要整数 --计算员工年龄SELECT FLOOR(MONTHS_BETWEEN(SYSDATE,birthdate)/12) FROM ps_personal_data …