-1

I have a table with two keys x,y. So when ever I insert into table I have to check if x and y combo already exists. if so then I have to update else insert. Can any one please help?

it should be something like

if "keys exisys" then update other columns else insert Thanks in advance

Sam
  • 1
  • 2
  • Possible duplicate of [Does DB2 have an "insert or update" statement?](http://stackoverflow.com/questions/330241/does-db2-have-an-insert-or-update-statement) – Charles Mar 22 '17 at 16:30

1 Answers1

1

The MERGE statement performs this function.