SQL
HR 스키마에서 job_history가 있는 사람은 Y를 붙여서 출력하는 sql문
영화처럼
2007. 4. 6. 16:35
create or replace view v_emp_job_history as
select distinct a.*, decode(b.employee_id, null, null, 'Y') history
from employees a, job_history b
where a.employee_id = b.employee_id(+);
select distinct a.*, decode(b.employee_id, null, null, 'Y') history
from employees a, job_history b
where a.employee_id = b.employee_id(+);