How to write the efficient query to merge two big tables
Posted on 2011-02-17
Have a question to simplify like this:
table T1 (ID number(5), FID number(10) )
table T2 (ID number(5), FID number(10) )
IDs are PK.
Would like to get:
That is if the records are in T1 but not in T2, take them, vice versa.
If they have the same PK, compare the FID. keep the larger one.
Since the tables are big, the efficiency should be taken into consideration. Is there any Oracle package for it?
Greatly appreciate the guru's tips/codes