Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Does INTERSECT return opposite from FULL OUTER JOIN?

Are the rows returned from two tables when using INTERSECT on those two tables the exact opposite set of rows returned with a FULL OUTER JOIN on those same two tables?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

So, they are not opposites. Thanks.
not sure what you mean by "opposites" :)

LEFT JOIN
A -
B -
C C

RIGHT JOIN
C C
- D

UNION
A
B
C
D

UNION ALL
A
B
C
C
D

Table1 MINUS Table2
A
B

Table2 MINUS Table1
D

Open in new window

Avatar of PortletPaul
Table1
Col1
A
B
C

Table2
col1
C
D

INTERSECT
col1
C

-- is this the opposite?

select coalesece(t1.col1, t2.col2) col1
from table1 t1
FULL OUTER JOIN table2 t2
where t1.col1 is null
or t2.col1 is null

Col1
A
B
D