1
SELECT [year] AS [value],[year] AS label FROM ( SELECT FORMAT(DATEADD(YEAR,-number,GETDATE()),‘yyyy‘) AS [year] FROM master.dbo.spt_values WHERE type=‘p‘ and number<10) AS t
sql 获取连续年份
原文:https://www.cnblogs.com/-7999/p/14657362.html