mysql 查询时间字段里年月相同的数据;
2021-03-19 本文已影响0人
Mylovesunshine
date_format(tbname,'%Y-%m')=date_format(now(),'%Y-%m')
date_format(库字段,'%Y-%m')=date_format(传入字段,'%Y-%m')
date_format(tbname,'%Y-%m')=date_format(now(),'%Y-%m')
date_format(库字段,'%Y-%m')=date_format(传入字段,'%Y-%m')