title: Merge, when matched insert
body: <p>I wish to perform constructive merge in Oracle i.e. if a matching record is found in the source table, a new record with current timestamp should be added to the destination table.</p>
  
  <p>How do I do this using merge in Oracle? Below is my code which gives a "missing keyword" error.</p>
  
  <pre><code>merge into studLoad sl
  using student s
  on(s.studID=sl.studID)
  when matched
  then
  insert(sl.studID,sl.studName)
  values(s.studID||'abc',s.studName)
  when not matched
  then
  insert(sl.studID,sl.studName)
  values(s.studID,s.studName);
  </code></pre>
  
  <p>Also, I dont know how to add current timestamp along with the <code>studName</code>. Any suggestions for the same would be welcome.</p>