Can you please give me a hand in starting this?
I have a table with this format:
CREATE TABLE [dbo].[ACS_ARMAZEM]
(
[ARM_ID] [INT] IDENTITY(20000,1) NOT NULL,
[ARM_DES] [NVARCHAR](50) NOT NULL,
[ARM_5_COD_DIG] [NVARCHAR](5) NOT NULL,
[ARM_SIT] [INT] NOT NULL,
[ARM_BIZ_TIP] [INT] NOT NULL,
[ARM_STK_CTRL] [INT] NOT NULL,
[ARM_DAT_CRI] [DATE] NOT NULL,
)
I need to log all changes (insert, delete or update) to a log table I have.
But I want to log the old and new values (even if a new row is inserted I want to log it as null in the old columns).
Best regards,
RL