根据出生日期计算年龄

select s.sname,timestampdiff(year,s.Sbirthday,curdate()) from student s

原文地址:https://www.cnblogs.com/yanghaoyu0624/p/11450804.html