select department_name || q'[ Dept's Mgr ID : ]' || manager_id
as "Department and Manager"
from departments;
select department_name || ' Dept''s Mgr ID : ' || manager_id
as "Department and Manager"
from departments;
[예제] employees 테이블에서 사원들의 employeeid, last_name, job_id를 출력하되 job_id가 SA로 시작되는 업무 담당자만 출력하는구분을 작성하시오.
[잘못된 답안]
select employee_id, last_name, job_id
from employees
where job_id like 'SA_%';
=> job_id가 SA로 시작되면서 3글자 이상인 업무담당자를 출력하시오.
[정답]
select employee_id, last_name, job_id
from employees
where job_id like 'SA\_%' escape'\';
select employee_id, first_name
from employees
order by employee_id
fetch first 5 rows only;
select employee_id, first_name
from employees
order by employee_id
offset 5 rows fetch next 5 rows only;
define emp_number = 200
define emp_number
undefine emp_number