请教sql2000,在视图里怎么加一列自增列
请问sql2000,在视图里如何加一列自增列?rt[解决办法]SQL codeselect ididentity(int,1,1) ,* into #t fro
请问sql2000,在视图里如何加一列自增列?
rt
[解决办法]
SQL codeselect id=identity(int,1,1) ,* into #t from tb
[解决办法]
[解决办法]
--sql 2000
select t.* , px = (select count(1) from tb where col < t.col) + 1 from tb t
--sql 2005
select t.* , px = row_number() over(order by col) from tb t
[解决办法]