查询结果返回 ‘年龄’多少,表名 temp1

select (year(curdate())-year(birth)) from temp1;
当前日期-出生日期

猜你喜欢

转载自blog.csdn.net/GK18733535990/article/details/88043863