设表为T ( n int)select id=identity(int,1,1),* int #t from Tselect a.n-b.n
from #t a join
( select id+1 nid,n
from #t
) b
on a.id=b.niddrop table #t
from #t a join
( select id+1 nid,n
from #t
) b
on a.id=b.niddrop table #t
调试欢乐多
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货