반응형
A.7 집합 연산자 사용
샘플 문제
SELECT EMPLOYEE_ID, JOB_ID
FROM EMPLOYEES
UNION
SELECT EMPLOYEE_ID, JOB_ID
FROM JOB_HISTORY
문제 1
SELECT EMPLOYEE_ID, JOB_ID, DEPARTMENT_ID
FROM EMPLOYEES
UNION ALL
SELECT EMPLOYEE_ID, JOB_ID, DEPARTMENT_ID
FROM JOB_HISTORY
ORDER BY EMPLOYEE_ID ASC;
문제 2
SELECT EMPLOYEE_ID, JOB_ID
FROM EMPLOYEES
INTERSECT
SELECT EMPLOYEE_ID, JOB_ID
FROM JOB_HISTORY;
문제 2 - 계속
???
문제 3
SELECT EMPLOYEE_ID
FROM EMPLOYEEs
MINUS
SELECT EMPLOYEE_ID
FROM JOB_HISTORY;
728x90
반응형