sql根据出生日期计算年龄

使用DATEDIFF()函数

select DATEDIFF(year,age,GETDATE()) Age from table

posted @ 2014-09-17 15:37  X.Y  阅读(6657)  评论(0编辑  收藏  举报