Re: merging tables
John,
You can add a unique index on the phone1 column. Then, you can do an insert into ... select ... on duplicate key update ... Or you can do an insert ignore ... In either case, just omit the primary key column and pretend the phone1 column is the primary key for the merge.
You could also do an insert select where you only select the rows from one table that aren't in the other table. You can do that by joining the tables or using an in subquery. The join will be faster.
HTH,
Chad
Subject
Written By
Posted
Re: merging tables
April 21, 2010 08:51AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.