Oracle VM Site Review - Oracle VM Health Check
view counter

How to Merge a Row

Thanks to William Robertson for this story

The tough challenge that seems to have been faced by this developer was that the ID, name and value passed into the procedure needed to be either applied as an update if the name existed, or else inserted as a new row. You might think you could just attempt the update, capturing the ID value with a RETURNING clause, then if that found no rows insert a new row using seq_somethings.NEXTVAL for the ID. But wait, that wouldn't be complicated enough, would it?

Oracle Virtualization and Cloud Consulting
view counter

Here's the table:

Read the entire article at its source

view counter