--重置Identity ID DBCC CHECKIDENT('[table_name]', RESEED, [new_reseed_value]) -- for example DBCC CHECKIDENT('product', RESEED, 0) --允许插入Identity列
SET IDENTITY_INSERT IdentityTable ON INSERT IdentityTable(TheIdentity, TheValue) VALUES (3, 'First Row') SET IDENTITY_INSERT IdentityTable OFF
--Check table existsIF OBJECT_ID('dbo.CustomersDups') IS NOT NULL DROP TABLE dbo.CustomersDups; GO
SQL - 脚本Tips
最新推荐文章于 2024-09-30 20:06:25 发布