I was trying to copy a row from one database to another database on different server, here is the query:
set identity_insert ms_tpl on
INSERT ms_tpl select * from [10.24.0.2].[MILKP].[dbo].[ms_tpl] where [id] = 3076
set identity_insert ms_tpl off
when I pressed F5, I got error message like this:
Msg 8101, Level 16, State 1, Line 3
An explicit value for the identity column in table ‘ms_tpl’ can only be specified when a column list is
used and IDENTITY_INSERT is ON.
Is there a mistake in my query? How to solve this problem?
more info: on database ms_tpl, there is one column called id with auto increment.
thanks
don’t use
*. List your columns: