Oracle/Oracle 기초
2019. 12. 17.
Oracle 특수 쿼리 및 집합
-- 특수 Query -- CASE DECODE SELECT employee_id, first_name, phone_number, case substr(phone_number, 1 , 3) when '515' THEN '서울' when '590' THEN '부산' when '659' THEN '광주' when '603' THEN '대전' ELSE '기타' END AS "지역" FROM employees; SELECT employee_id, first_name, phone_number, case when substr(phone_number, 1, 3) = '515' then '서울' when substr(phone_number, 1, 3) = '590' then '부산' when substr(phone_n..