In sql server i use triggers on table, when a new record is inserted or an existing repor is update, create a copy of that row to another log table.
This is useful in terms of managing delta's on any tables data.
This is how i create:
CREATE TRIGGER [dbo].[insMARA_Changelog] ON [dbo].[MARA]
FOR INSERT, UPDATE
DECLARE @TimeStamp datetime
Set @TimeStamp = GetDate()
INSERT INTO MaraChange_log
(all fields here)
fields here from mara table
FROM inserted ins JOIN mara na ON
na.maraprimarykeyID = ins.maraprimarykeyID
Can someone please provide details how to use table based triggers on insert on update on a table record to create a copy of that row to a change log table.
Thanks a lot for the helpful info.