![]() |
用sql语句更改自动编号的字段重新重'1'开始编号
tableName(id,clcode,cloth) id字段为identity(int,1,1) 重建id
select * into #aa from tableName truncate table tableName dbcc checkident(tableName,reseed,0) set IDENTITY_INSERT ON insert tableName(clcode,clname) select clcode,clname from #aa //注意不能选择id列 drop table #aa |
| All times are GMT +8. The time now is 02:01 AM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.