Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Support Returning clause in Merge statement

John_KMay 17 2016 — edited May 22 2018

I would like to see the Merge clause support Returning as is the case in native Insert/Update/Delete's.

For example

Merge Into xxTmp1

Using (Select Null, 'Test' val From dual) n

On (xxTmp1.id = newrow.id)

When Matched Then Update Set (val=n.val)

Delete Where (pDeleteFlag='Y')

When Not Matched Then Insert (id, val) Values (xxTmp_Seq.NextVal, n.val)

Returning id Into pID;

Duplicate of: Support returning clause in 'merge' and 'insert as select'?

Comments
Post Details
Added on May 17 2016
2 comments
3,831 views