SELECT TRUNC(months_between(sysdate, to_date('2000-06-11','yyyy-mm-dd'))/12) AS age from dual

年龄,小于 1 岁,计算天数

select decode(TRUNC(months_between(sysdate, to_date('2001-06-11','yyyy-mm-dd'))/12),0,trunc(sysdate-to_date('2001-06-11','yyyy-mm-dd')),TRUNC(months_between(sysdate, to_date('2001-06-11','yyyy-mm-dd'))/12)) from dual