title: How to return primary key from oracle merge query
body: <p>I want to return the primary key from an oracle merge query. 
  I'm using a single statement to insert if not exist and I don't want to use procedure or function to do so.. </p>
  
  <p>this is the sample query</p>
  
  <pre><code>merge into myTable e
    using (select :empname name from dual) s
    on (UPPER(TRIM(e.empname)) = UPPER(TRIM(s.name)))
    when not matched then insert (empname) 
      values (s.name)
  </code></pre>
  
  <p>and I need to get another primary key field of the myTable. the primary key is inserted using sequence and trigger </p>
  
  <p>I tried adding  <code>RETURNING empID into :empId</code>  but it gives error</p>