mysql數(shù)據(jù)查詢語句,Mysql如何使用SQL語句查詢時(shí)間段?
SELECT * FROM 表名 where 時(shí)間字段 BETWEEN 開始時(shí)間 and 結(jié)束時(shí)間;例如:SELECT * FROM table where time BETWEEN '2018-05-20' and '2018-05-21' ;
SELECT * FROM 表名 where 時(shí)間字段 BETWEEN 開始時(shí)間 and 結(jié)束時(shí)間;例如:SELECT * FROM table where time BETWEEN '2018-05-20' and '2018-05-21' ;