title: How can I implement conditional updating in Oracle?
body: <p>I'm new to oracle and having a problem with one of my SQL Queries.</p>
  <p>There are 2 Users: <code>User1</code> and <code>User2</code>:</p>
  <pre>
       Tab1               Tab2
      --------            -------- 
      
      EmpNo               EmpNo
      EmpName             EmpName
      ContactNo           Salary
      Location    
  </pre>
  <p>User2 has all privileges in User1.Tab1, and there is no foreign key relationship between the two tables.</p>
  <h3>The Problem:</h3>
  <p>I wanted to add a column in tab2 &quot;<code>NameDesignation</code>&quot; And I wanted to insert the value in this column after checking the following condition:</p>
  <pre><code>WHEN User1.Tab1.EmpNo = User2.Tab2.EmpNo THEN
     INSERT INTO Tab2 VALUES (&amp;designation)
  </code></pre>
  <p>I really have no idea how to do this, and was hoping for a little help. Any thoughts?</p>