title: PL/SQL Update Join?
body: <p>I know there is no Update-Join statement in PL/SQL. I used to write T-SQL.</p>
  
  <p>I have two tables.</p>
  
  <pre><code>Alex_Table1
  ---------------------------
  PK         VAL
  ---------------------------
  1          Value1
  2          Value2
  3          Value3
  
  
  Alex_Table2
  ---------------------------
  PK         VAL
  ---------------------------
  1          Value1_2
  3          Value3_2
  </code></pre>
  
  <p>I want to update VAL from Alex_Table2 to Alex_Table1 joining by PK column.</p>
  
  <p>In T-SQL, that is simple</p>
  
  <pre><code>update t1 set t1.VAL = t2.VAL
  from
      Alex_Table1 t1
      inner join Alex_Table2 t2 on t1.PK = t2.PK;
  </code></pre>
  
  <p>And the result is what I expected</p>
  
  <pre><code>Alex_Table1
  ---------------------------
  PK         VAL
  ---------------------------
  1          Value1_2
  2          Value2
  3          Value3_2
  </code></pre>
  
  <p>My question is how to do in PL/SQL? Thanks!</p>
  
  <p><strong>Update</strong></p>
  
  <p>Thanks Cybernate and ypercube gave me two useful solutions. They both work. However, I want to let you know the performance between these two statements.</p>
  
  <p>My actual table contains 80,000 records and only 3,000 needs update.</p>
  
  <p><code>MERGE</code> statement takes 0.533 seconds.</p>
  
  <p><code>UPDATE EXISTS</code> statement takes over 3 minutes ( I did not measure the actual time. I terminated my process after 3 minutes.)</p>