Inserting into a table specially the value in its identity column !!

Posted by Puneet20884 under Sql Server category on | Views : 1660
Sometimes we may need have a value required in our master table which have some corresponding data in other table and we may not update that table's record because of some reason say the info has been gone to client through link etc.

So we need to insert into the identity column as well sometimes.

SO before inserting the record we need to set the identity insert ON by the code below :

set identity_insert as_tblFeatureType ON

And once done, Off the Identity insert by

set identity_insert as_tblFeatureType OFF

Comments or Responses

Login to post response