In MySQL the following will tell you what the date was a month ago:
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH);
The SQL fiddle.
How can this be done in SQL Server?
In MySQL the following will tell you what the date was a month ago:
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH);
The SQL fiddle.
How can this be done in SQL Server?
try this
SELECT DATEADD(month, -1, GETDATE());