摘要:
得到连续序号SQL2000:1:select number from master..spt_values where type='p' --0-2552: select top 10000 id=identity(int,1,1) into #t from sysobjects,syscolumnsSQL2005:1:CTE方式递归with cte as( select 1 as num union all select num +1 from cte where num<1000)select * from cte option(maxrecursion 0)... 阅读全文