Deepak Ratan

Deepak Ratan

  • 1.9k
  • 175
  • 42.8k

SQL Trigger for adding Old Val and New Val to audit table

Jun 22 2015 5:28 AM
Hi All,
 
        This is My tables,  Using trigger in  Audit ( SQL ) how can we find OLD Value and NEW value when the table is Insert or Update or Delete,
Help 
 
Tabel : 1 
 
BusinessEntityID    int PRIMARY KEY
RateChangeDate   datetime
Rate     money
PayFrequency    tinyint------ > Have to change this column
ModifiedDate    datetime
 Tabel : 2
 
BusinessEntityID int PRIMARY KEY
Old_Value   tinyint
New_Value   tinyint 
ModifiedDate datetime
 

Answers (3)