创建student表
student表中插入数据
查询表中数据

查询每个人的年龄
方法一:
curdate() 函数和 now() 函数的区别:
year( )函数:

方法二:
date_format( now(), '%Y') 函数和 date_format( birth, '%Y')函数:

MySQL中根据出生日期计算年龄
阅读 13
2024-01-18
创建student表
student表中插入数据
查询表中数据

curdate() 函数和 now() 函数的区别:
year( )函数:

date_format( now(), '%Y') 函数和 date_format( birth, '%Y')函数:

相关推荐
精彩评论(0)