728x90
Q. 두 'king' 사원의 salary(e), first_name(e), employee_id(e), job_title(jobs), department_name(departments)를 보이시오.
-- [Oracle Join]
select last_name, salary, employee_id, job_title, department_name
from employees e, jobs j, departments d
where e.job_id = j.job_id
AND e.department_id = d.department_id
AND last_name = 'King';
-- [ANSI JOIN]
select last_name, salary, employee_id, job_title, department_name
from employees e JOIN jobs j ON e.job_id = j.job_id
JOIN departments d ON e.department_id = d.department_id
where last_name = 'King';
'일단 해보는 코딩 > Oracle SQL' 카테고리의 다른 글
[오라클/SQL] GROUP BY (ROLLUP/CUBE), 계층적 질의 (0) | 2022.06.09 |
---|---|
[오라클/SQL] 집합연산자(UNION/UNIONALL/INTERSECT/MINUS) (0) | 2022.06.08 |
[오라클/SQL] JOIN - INNER/OUTER/ON (0) | 2022.06.08 |
[오라클/SQL] 테이블 생성,변경,삭제하기 (0) | 2022.06.03 |
[오라클/SQL] 정규 표현식 (0) | 2022.06.03 |