要么
SELECT DATEADD(yy,GETDATE())
SELECT DATEADD(yyyy,GETDATE())
如果要将其存储为变量:
DECLARE @twoYearsAgo DATETIME; SELECT @twoYearsAgo = DATEADD(year,GETDATE());