i tried to copy , but i get error message
"
An explicit value for the identity column in table 'Dbname.dbo.tbl can only be specified when a column list is used and IDENTITY_INSERT is ON.
"How to solve thi problem?
An explicit value for the identity column in table 'Dbname.dbo.tbl can only be specified when a column list is used and IDENTITY_INSERT is ON.
"Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 9, 2011, 7:53 PM EST
It can mean two things :
1. One you've not enabled identity insert on your table, meaning SQL Server will not let you insert into the Identity column.
This can be rectified with the following statement:
SET IDENTITY_INSERT table_name ON
And then turn it off again when done
SET IDENTITY_INSERT table_name OFF
2. However it can also mean that you are using for example INSERT INTO, in which cause the message tells you to specify the
column names. This means using the following syntax:
INSERT INTO target_able_name (column_name1, column_name2…. column_nameN)
SELECT
YOUR_SELECT_LIST_WHICH_MATCHES_COLUMN_LIST
FROM source_table_name
Suthish NairRank #92 · 22.8K reputationPosted Mar 10, 2011, 8:56 AM EST