select convert(varchar(7),dateadd(month,number,'2010-01-01'),120) AS MONTH
from master..spt_values
where type='P' and dateadd(month,number,'2010-01-01')<='2010-09-01'
转载于:https://www.cnblogs.com/xiufengd/p/5069753.html
select convert(varchar(7),dateadd(month,number,'2010-01-01'),120) AS MONTH
from master..spt_values
where type='P' and dateadd(month,number,'2010-01-01')<='2010-09-01'
转载于:https://www.cnblogs.com/xiufengd/p/5069753.html