Sql server current date minus 5 years

This article is tagged with: Sql server current date minus 5 years and mysql

sql server current date minus 5 years

SELECT GETDATE() 'Today',
           DATEADD(day,-2,GETDATE()) 'Today - 2 Days'
SELECT GETDATE() 'Today',
           DATEADD(dd,-2,GETDATE()) 'Today - 2 Days'
SELECT GETDATE() 'Today',
           DATEADD(d,-2,GETDATE()) 'Today - 2 Days'

This article is tagged with: Sql server current date minus 5 years and mysql