Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人知道如何使用两个日期之间的条件查询数据库。例如:SELECT * FROM table WHERE date between "begin" and "end"
它基于您的日期列使用的数据类型。我通常将其保存为varchar(8)(例如:20150707)。所以很容易在两个日期之间进行查询:
varchar(8)
select * from table where date > '20150707'