OracleString FunctionsDECODE
REGEXP_INSTR

DECODEString Functions

NVL

Conditional substitution similar to CASE.

Syntax

DECODE(expr, s1, r1 [, s2, r2 ...] [, default])

Example

Enter values below to update the example in real time.

employee_id
dept_code
dept_name
employees
-- 부서 코드를 이름으로 변환
SELECT employee_id,
       DECODE(dept_code, 'HR', '인사', 'FN', '재무', 'IT', '개발', '기타') AS dept_name
FROM employees;