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.
如何用 SQL 编写...where mytable.somedate from today is older that 30 days。我正在使用 db2。
...where mytable.somedate from today is older that 30 days
这应该这样做:
SELECT * FROM mytable WHERE somedate < CURRENT_TIMESTAMP - 30 DAYS