Hi,
I am trying to replicate an old code into my system. At one of the places an Oracle table is uisng Upsert mode. I tried googling out the meaning of Upsert mode but no where could I find a good explanation. Could anyone explain me with an example what an Upsert mode actually does?
Upsert mode in Oracle
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Upsert does one of two things.
1. It attempts to UPDATE and, if that fails because the record does not exist, it performs an INSERT.
2. It attempts to INSERT and, if that fails because the record already exists, it performs an UPDATE.
Which of these occurs depends on the setting of an additional property.
1. It attempts to UPDATE and, if that fails because the record does not exist, it performs an INSERT.
2. It attempts to INSERT and, if that fails because the record already exists, it performs an UPDATE.
Which of these occurs depends on the setting of an additional property.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.