SQL 使用identity(int,1,1)来产生行号。

1、使用identity(int,1,1)来产生行号,必须把数据插入到一张表中。

2、如图:

 3、代码如下:

 select rowid=identity(int,1,1),userip into tempT from useraccess
 select * from tempT

  

原文地址:https://www.cnblogs.com/ShaYeBlog/p/2693836.html