title: How to get old value and new value of multiple field in trigger in SQL server?
body: <p>I have a table <code>Person</code>:</p>
  
  <pre><code>CREATE TABLE Person
  (
      ID INT PRIMARY KEY,
      FirstName varchar(50),
      LastName varchar(50),
      Phone varchar(50),
      Address varchar(50),
      City varchar(50),
      PinCode varchar(50),
      DateOfBirth DATETIME,
      UpdatedOn DATETIME,
      UpdatedBy varchar(50)
  )
  </code></pre>
  
  <p>Whenever I insert or update the multiple fields from above table then I want previous value and current value of all updated fields and store that in another table using Trigger. How we can get values of all updated fields.</p>
  
  <p>For example</p>
  
  <pre><code>INSERT INTO Person 
  VALUES (1, 'first', 'last', '11111', 'add', 'city', 'pin', GETDATE(), GETDATE(), 'ABC')
  
  UPDATE Person
  SET FirstName = 'First11', 
      LastName = 'Last22', 
      Phone = '1010101010'
  WHERE id = 1
  </code></pre>
  
  <p>When I will hit above commands in both cases I want old and current value and store it in another table. How we can achieve this using triggers?</p>