1.查询指定年月数据的MySQL语句
语句:select * from 表名 where year(列名)=‘2022’ and month(列名)=‘08’;
举例:
select * from lingdian where year(create_time)=‘2022’ and month(create_time)=‘08’;
查询结果如下图:
1.查询指定年月数据的MySQL语句
语句:select * from 表名 where year(列名)=‘2022’ and month(列名)=‘08’;
举例:
select * from lingdian where year(create_time)=‘2022’ and month(create_time)=‘08’;
查询结果如下图: