日期:2014-05-16  浏览次数:20485 次

根据生日计算年龄

?

select (year(now())-year('19850223')-1) + 
( DATE_FORMAT('19850223', '%m%d') <= DATE_FORMAT(NOW(), '%m%d') ) as age;

?

?