Aryan PrajapatKnowledge Contributor
Is it possible to implicitly insert a row for the identity column?
Is it possible to implicitly insert a row for the identity column?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
Yes. We can implicitly insert a row for the identity column. Here is an example of doing this:
SET IDENTITY_INSERT TABLE1 ON
INSERT INTO demo_table1 (id, name, branch)
SELECT id, name, branch FROM demo_table2
SET IDENTITY_INSERT OFF