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.
我需要查询以获取 atimestamp正好在 4 天前之后的行。
timestamp
例如,如果我在 2012 年 6 月 6 日下午 1 点运行查询,它应该选择日期在 2012 年 6 月 2 日下午 1 点之后的行。我该怎么做?
SELECT * FROM mytable WHERE created_at < /* 4 days ago this time */;
信不信由你,这非常容易。
SELECT * FROM mytable WHERE created_at > sysdate - 4