SELECT PRE_OPERATE_DATE FROM fj_con_electricalprojec_b WHERE PRE_OPERATE_DATE BETWEEN DATE_SUB(NOW(), INTERVAL - 30 DAY);
语句报错是怎么回事? [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
求解其他查询方法~
1
pushback 2020-05-12 13:53:32 +08:00
BETWEEN DATE_SUB(NOW(), INTERVAL 30 DAY) and DATE_ADD(NOW(), INTERVAL 30 DAY)
|
2
pushback 2020-05-12 13:55:47 +08:00
差个 and,吧 and 前后换成你想要的日期就行了,选个函数
|