Oracle DB version: 8.1.7
Scenario:
---------
There are three tables A, B, and C. All of them have columns - c1, c2, and c3. Table A has about 30 million recods, table B - about 60 million records, and table C - about 1.5 million records.
Question:
---------
With one query, how can we retrieve all records (i.e., c1, c2, and c3) that belong either to table A, or B, but not in table C?
In other words, I need to find those records (columns c1,c2,c3) that belong to a DISTINCT record list based on tables A and B, but do not belong to table C.
Example:
--------
Table A Table B Table C
-------- -------- --------
c1 c2 c3 c1 c2 c3 c1 c2 c3
-------- -------- --------
a1 a2 a3 a1 a2 a3 b1 b2 b3
b1 b2 b3 b1 b2 b3 m1 m2 m3
p1 p2 p3
Based on the above example, record "a1 a2 a3" exists in tables A and B but not in table C. Also, record "p1 p2 p3" exists in A but not in C.
Is it possible to accomplish this with one query?
Thanks.
<ruse7013>
Scenario:
---------
There are three tables A, B, and C. All of them have columns - c1, c2, and c3. Table A has about 30 million recods, table B - about 60 million records, and table C - about 1.5 million records.
Question:
---------
With one query, how can we retrieve all records (i.e., c1, c2, and c3) that belong either to table A, or B, but not in table C?
In other words, I need to find those records (columns c1,c2,c3) that belong to a DISTINCT record list based on tables A and B, but do not belong to table C.
Example:
--------
Table A Table B Table C
-------- -------- --------
c1 c2 c3 c1 c2 c3 c1 c2 c3
-------- -------- --------
a1 a2 a3 a1 a2 a3 b1 b2 b3
b1 b2 b3 b1 b2 b3 m1 m2 m3
p1 p2 p3
Based on the above example, record "a1 a2 a3" exists in tables A and B but not in table C. Also, record "p1 p2 p3" exists in A but not in C.
Is it possible to accomplish this with one query?
Thanks.
<ruse7013>