2005用 SELECT ROW_NUMBER() OVER (order by col2 ) AS COL,col1,col2 from tb1 2000用 select col= identity(int,1,1),col1,col2 into # from tbl select * from # drop table #
本篇文章來自<A href='http://www.soidc.net'>IDC專家網</a> 原文連結:http://www.soidc.net/discuss/31/040101/00/502100_1.html
轉載于:https://www.cnblogs.com/lhuser/articles/1526783.html