How to edit identity field in sql?
Usually, the identity field does not allow the user to edit, when you right-click on the table and select Edit.
But we can edit this column through a query. Through query, we can temporarily on the identity insert. Remember after editing the column you should off it, if not you cannot able to edit the identity field on other tables.
Example
But we can edit this column through a query. Through query, we can temporarily on the identity insert. Remember after editing the column you should off it, if not you cannot able to edit the identity field on other tables.
Example
SET IDENTITY_INSERT Table_Name ON
INSERT Table_Name(IdentityColumnName, Col1,Col2) VALUES (54,value1,value2)
SET IDENTITY_INSERT Table_Name OFF
Post a Comment for "How to edit identity field in sql?"