MySQL 中有一张订单表(order_info_table),其中有字段"creat_time"表示订单创建时间,现要查看当月创建的订单信息,以下 SQL 语句正确的是()
SELECT * FROM order_info_table where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)
SELECT * FROM order_info_table WHERE create_time =DATA_FORMAT(CURDATE(),'%Y%m')
SELECT * FROM order_info_table WHERE DATA_FORMAT(create_time,'%Y%m') =DATA_FORMAT(CURDATE(),'%Y%m')
SELECT * FROM order_info_table WHERE DATA_FORMAT(create_time,'%m') = DATA_FORMAT(CURDATE(),'%m')
这道题你会答吗?花几分钟告诉大家答案吧!