title: Oracle: Update based on condition
body: <p>I want to update a column of table based on a condition. It should check if the value exists in other table, if exists then value from other table will be used else value from same table will be used.</p>
  
  <pre><code>Update table1
  Set column1=(select t2.alias||’@email.com’ as new_name
  From table2 t2, table1 t1, table3 t3
  Where t1.id=t2.id
  And t1.id=t3.id
  
  Else if
  Select t2.alias is null or t2.id is null 
  then column1= select t1.id||’@email.com’ as new_name 
  </code></pre>
  
  <p>Any suggestions on this??</p>
  
  <p>Thanks in advance. </p>