摘要: 1.自增列通用:select id=(select count(1) from table b where b.sid<a.sid) ,* from table a;select id=identity(int,1,1),* from ...第二个已经有主键自增列的就不可以用了还有就是rownumber2. CREATE TABLE dbo.#testTab ( Id int NOT NULL ) 添加数据: insert into #testTab values(3); insert into #testTab values(4); insert into #testTab valu. 阅读全文
posted @ 2013-07-25 10:59 hongdada 阅读(290) 评论(0) 推荐(0) 编辑