sql server self-incrementing id allows inserting display values

GO

ALLOW INSERT Display insert value for primary key id
SET IDENTITY_INSERT [table name] ON

Execute the insert insert statement-------------------

Turn off insert display value
SET IDENTITY_INSERT [ table name]  OFF

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892672&siteId=291194637