Skip to content

Instantly share code, notes, and snippets.

@sherman
Created February 17, 2012 07:47
Show Gist options
  • Save sherman/1851640 to your computer and use it in GitHub Desktop.
Save sherman/1851640 to your computer and use it in GitHub Desktop.
merge /*+ index(e ext_val_pk6) use_nl(e) string*/
into ext_values e
using (select ? txn_id, ? exn_id, ? ext_value from fastdual) d
on (e.txn_id = d.txn_id and e.exn_id = d.exn_id)
when matched then update set ext_value = d.ext_value
when not matched then insert (txn_id, exn_id, ext_value) values (d.txn_id, d.exn_id, d.ext_value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment