Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Ensureing 1to1 relation with multiple Key Fields
consider use of set operators:
SELECT c1,c2,c3
FROM dataset_a
MINUS
SELECT c1,c2,c3
FROM dataset_b
/
SELECT c1,c2,c3
FROM dataset_b
MINUS
SELECT c1,c2,c3
FROM dataset_a
/
On 4 Feb 2002 09:26:05 -0800, simon_at_klaiber.com (Simon Klaiber) wrote:
>Hi,
>
>I have following problem:
>
>I have two tables with about 10 million data sets each. Every Dataset
>is indentified by a unique (per table) combination of the datafields
>(lets call them c1, c2 and c3).
>
>I need to find a SQL only Solution to filter out all all datasets that
>don't have a matching (same c1, c2 and c3) dataset in the other table.
>
>Looking at the big amount of Datasets it must be done in a perfomant
>way.
>
>Do you havb a tip how to try it?
>
>Thanks
>Simon
>Frankfurt/Germany
regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de
Received on Tue Feb 05 2002 - 13:40:22 CST
![]() |
![]() |