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.
在 MySQL 中,以下内容将告诉您一个月前的日期:
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH);
SQL小提琴。
这如何在 SQL Server 中完成?
尝试这个
SELECT DATEADD(month, -1, GETDATE());