I must restore single table from backup.
But table has columny Id and timestamp
SET IDENTITY_INSERT [Production].[dbo].[SystemInfos] ON
INSERT INTO [Production].[dbo].[SystemInfos]
(ID, Ident, Value, Data, Stamp)
SELECT * FROM [Archive].[dbo].[SystemInfos]
SET IDENTITY_INSERT [Production].[dbo].[SystemInfos] OFF
When use this query I have error
Cannot insert an explicit value into a timestamp column. Use INSERT
with a column list to exclude the timestamp column, or insert a
DEFAULT into the timestamp column.
When use query like this
SET IDENTITY_INSERT [Production].[dbo].[SystemInfos] ON
INSERT INTO [Production].[dbo].[SystemInfos]
SELECT * FROM [Archive].[dbo].[SystemInfos]
SET IDENTITY_INSERT [Production].[dbo].[SystemInfos] OFF
I have error
An explicit value for the identity column in table
‘APILOV22.dbo.SystemInfos’ can only be specified when a column list is
used and IDENTITY_INSERT is ON.
how to import tables by modifying id and set timstamp?