title: How to get updated columns from a table?
body: <p>I am working with SQL Server Triggers. And I need a sql query to find columns from a table whose values has been updated using of INSERTED and DELETED tables.</p>
  
  <p>Can anyone help me out on this ? For ex -</p>
  
  <pre><code>DECLARE @T1 TABLE (Name NVARCHAR(MAX), LName nvarchar(max), Address1 Nvarchar(max),id int)
  
  DECLARE @T2 TABLE (Name NVARCHAR(MAX), LName nvarchar(max), Address1 Nvarchar(max), id int)
  
  
  insert into @T1 values('Ricky','Broad','a b road',1)
  
  insert into @T1 values('Mike','Halls','m g road',2)
  
  
  insert into @T2 values('Ricky_Update','Broad','a b road',1)
  
  insert into @T2 values('Mike','Halls','m g road',2)
  
  
  ;WITH ChangedData AS (
  SELECT d.name , d.LName FROM @T1 d
  EXCEPT 
  SELECT i.name , i.LName  FROM @T2 i
  )
  </code></pre>
  
  <p>I tried to find out by "EXCEPT" but it's returning whole updated row. And I need only updated columns like in above example I only need-</p>
  
  <p>Name column for id =1 because it's updated.</p>