利用服务器
表1
ID Name
001 Raja
002 Ravi
003 Suresh
004 Kamal
...
我需要设立一个新的表格,为每个栏目确定身份
Tried query
insert into table2
select * from table1
预期产出
S.No ID Name
1 001 Raja
2 002 Ravi
3 003 Suresh
4 004 Kamal
...
I create the new table and made the S.No column is identity in the table. It is creating the identity number for each row, then I delete all the row, again inserted, but identity is created from last row next number onwards.
例
S.No ID Name
1 001 Raja
2 002 Ravi
3 003 Suresh
4 004 Kamal
...
删除所有各行,我再次插入。
S.No ID Name
5 001 Raja
6 002 Ravi
7 003 Suresh
8 004 Kamal
...
预期产出
身份应从第1号开始,只要我从表格中删除所有各行。
问询