title: inner join and update
body: <p>I have a table1 as below </p>
  
  <pre><code>user_ID country  status  role
  -------- ------ ------- -----
  keshav   SG        Active  Admin
  Bargav   IN        Active  Subuser
  Sanvi     GB       Active   subuser
  yellin    CN       Active    subuser
  </code></pre>
  
  <p>I have another table stage_table as below </p>
  
  <pre><code>user_ID  country   role 
  -------  -------  ------
  keshav     SG      Admin
  Sanvi      GB      subuser
  Manav      IN      subuser 
  </code></pre>
  
  <p>I want to update table1 based on stage_table. As you can see stage_table doesnot have Bargav record so I want to update table1 Bargav row with status as "InActive"  and Manav entry is new so update it as it is with status as "Active". Thus table1 should be as below </p>
  
  <pre><code>user_ID  country  status Role 
  -------  -------  ------  -----
  keshav   SG        Active  Admin
  Bargav   IN        InActive  Subuser
  Sanvi     GB       Active   subuser
  yellin    CN       Active    subuser
  Manav     In       Active    subuser
  </code></pre>
  
  <p>I am thinking of using an inner join as below, is this correct? I am not getting the desired result.. because I don't know how to do merge and update simultaneously </p>
  
  <pre><code>select * 
  from table1 
  inner join stage_table on table1.user_ID = stage_table.user_ID 
                         and (update table.status ="InActive" 
                              where table1.user_Id != stage_table.user_ID) 
  </code></pre>
  
  <p>Please help.</p>