orcal根据身份证获取年龄

--根据身份证获取年龄

select   floor(months_between(SYSDATE, to_date(substr2(a.identifynumber, 7, 8), 'yyyy-mm-dd')) / 12) 年龄    from  A ;

--根据出生日期计算年龄

select   floor(months_between(SYSDATE, to_date(a.birthday,'yyyy-mm-dd'))/ 12)  年龄    from A ;

猜你喜欢

转载自blog.csdn.net/jungeCSND/article/details/106809776