oracle
select 出生日期, to_char(sysdate,'YYYY') - to_char(出生日期,'YYYY') as 年龄 from dbo.A001
ms sql
select datediff(year,出生日期,getdate()) as '年龄' from dbo.A001
oracle
select 出生日期, to_char(sysdate,'YYYY') - to_char(出生日期,'YYYY') as 年龄 from dbo.A001
ms sql
select datediff(year,出生日期,getdate()) as '年龄' from dbo.A001