mysql计算年龄
时间:2021-07-01 10:21:17
帮助过:2人阅读
(CURDATE())
-YEAR(addtime)
-(
RIGHT(CURDATE(),
5)
<RIGHT(addtime,
5))
addtime=‘2006-11-2‘
mysql> SELECT id,
YEAR(CURDATE())
-YEAR(addtime)
-(
RIGHT(CURDATE(),
5)
<RIGHT(addtime,
5))
FROM user where id
=‘109480‘
来自:http://www.cnblogs.com
/fenglie
/p
/3985521.html
mysql计算年龄
标签: