sql时间段查询

select * from table where
(
date >= ‘2020-08-10‘ AND date <= ‘2020-08-11‘
)
OR (
date <= ‘2020-08-10‘ AND date >= ‘2020-08-11‘
)
OR (
date >= ‘2020-08-10‘ AND date <= ‘2020-08-11‘
)

sql时间段查询

上一篇:数据库简单介绍(一)


下一篇:MySQL主从