순수한 사용법이라 첨언 할 부분이 없다.
기본 구조는 이러하다
case when 조건1 then 결과1 when 조건2 then 결과2 when 조건3 then 결과3 else 결과n
■ 예제
select case 직급 when '사원' then 1 when '주임' then 2 when '대리' then 3 when '과장' then 4 else 5 end 직급코드 from 직원테이블
순수한 사용법이라 첨언 할 부분이 없다.
기본 구조는 이러하다
case when 조건1 then 결과1 when 조건2 then 결과2 when 조건3 then 결과3 else 결과n
■ 예제
select case 직급 when '사원' then 1 when '주임' then 2 when '대리' then 3 when '과장' then 4 else 5 end 직급코드 from 직원테이블