I want to copy a table row before updating, and I am trying to do this as follows:
CREATE TRIGGER first_trigger_test
on Triggertest
FOR UPDATE
AS
insert into Triggertest select * from Inserted
Sorry, I am getting an error
Msg 8101, Level 16, State 1, Procedure first_trigger_test, Line 6
An explicit value for the identity column in table 'Triggertest' can only be specified when a column list is used and IDENTITY_INSERT is ON.
I guess this is due to the id column; can I do something like an "except" id? I do not want to list all the columns in the trigger, as this should be as dynamic as possible ...
source
share