Merge doesn't do delete

  • From: John J Cantu <John_J_Cantu@xxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 13 Oct 2006 08:30:49 -0500

All,

The 'Merge' command seems to be incomplete since it doesn't delete records 
that don't exist.  The 'Merge' command only performs an update or insert. 
Isn't the purpose of the 'Merge' command to kind of make one table look 
like another one?  Sure there will be times when only updating and 
inserting records is enough to keep the tables insync, but only if records 
aren't deleted from the source table.  Any comments or suggestions on the 
best way to keep two tables in sync within the same database?  Will I have 
to run two commands, one command will be the Merge to update and insert 
and a delete command that queries for keys that don't exist anymore in the 
source table? 

Thanks,

John Cantu

Other related posts: