select px = identity(int,1,1) , * into test from t
order by s , r , id
在使用 identity(int,1,1) 是的到的为什么不是排序后的呢?order by好像没有什么效果阿!
------解决方案--------------------
select px = identity(int,1,1) , * into test from (select * from t order by s,r,id) a
------解决方案--------------------
select px = identity(int,1,1) , * into test from t order by s , r , id
这样应该是可以的.