title: SQL MERGE Statement with More Than 2 Tables
body: <pre><code>Table 1
  Id Name Address
  
  
  Table 2
  Id Company Salary
  
  Table3
  Id Name Address Company Salary Age Sex
  </code></pre>
  
  <blockquote>
    <p>I want to Merge These table in a single MERGE statement, Is This
    Possible??</p>
  </blockquote>
  
  <p>Like</p>
  
  <pre><code>MERGE table1 AS tg1
  MERGE table2 AS tg2
  USING (SELECT Id ,Name ,Address FROM Table3) AS sr
  ON tg1.Id = sr.Id and tg2.Id = sr.Id
  WHEN MATCHED (tg1.Id =sr.Id) then DELETE
  WHEN MATCHED (tg2.Id =sr.Id) then UPDATE SET tg2.Company = 'MyCompany'+sr.Company
  and so on..
  </code></pre>
  
  <blockquote>
    <p>Is there any other Keyword i need to use for this type of <code>MERGE</code>
    Statement, or i need to <code>use</code> two different <code>MERGE</code> Statement for
    this.</p>
  </blockquote>