查询2020年的数据:
select * from day_rate where year(时间字段)='2020'
查询2月份的数据:
select * from day_rate where month(时间字段)='02'
查询2020年2月份的数据:
select * from day_rate where year(时间字段)='2019' and month(时间字段)='02'
select * from day_rate where year(时间字段)='2020'
select * from day_rate where year(时间字段)='2019' and month(时间字段)='02'
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。