★ PL/SQL 면접 질문 ( 프로시저 사용 이유 )

양혜정·2024년 3월 12일

Oracle

목록 보기
41/49

SQL 문도 있지만 PL/SQL (프로시저) 를 사용하는 이유

속도


Ex)

-- SQL 문
select employee_id, first_name || ' ' || last_name,
   case when substr(jubun, 7, 1) in('1','3') then '남' else '여' end,
 		to_char( nvl(salary + (salary * commission_pct), salary)
   													, '9,999,999')
from employees
where employee_id = 101;
-- PL/SQL (프로시저) 사용한 경우
select *
from user_source
where type = 'PROCEDURE' and name = 'PCD_EMPINFO';

0개의 댓글