Oracle/SQL Query
The UNION [ALL], INTERSECT, MINUS Operators
천정현
2009. 3. 20. 17:27
Examples The following query is valid:
SELECT 3 FROM DUAL INTERSECT SELECT 3f FROM DUAL;
This is implicitly converted to the following compound query:
SELECT TO_BINARY_FLOAT(3) FROM DUAL INTERSECT SELECT 3f FROM DUAL;
The following query returns an error:
SELECT '3' FROM DUAL INTERSECT SELECT 3f FROM DUAL;
union all 은 다붙이기
union 은 합집합 distinct 문을 쓴 결과와 같다. 중복없도록 출력
intersect 은 교집합으로 중복이 되는 rows만 출력
minus 는 차집합으로 위의 result set에서 아래의 result set을 제거 한 나머지만 출력