mysql 怎么查询一年的数据
select * from 表 where date_format(日期,'%Y-%m-%d')='2014-04-01' 日期
select * from 表 where date_format(日期,'%Y-%m')='2014-04' 月份
select * from 表 where date_format(日期,'%Y')='2014' 年
就是date_format(日期,'%Y-%m-%d') 这里的参数长短
mysql 查询年数据
猜你喜欢
转载自blog.csdn.net/zy1471162851/article/details/102464978
今日推荐
周排行