Loading...

DB/Oracle / / 2022. 2. 4. 14:33

DB 12강. SQL 조건문 decode( )

반응형

comm이 null인게

true면 0,

false면 comm 그대로

 

decode(대상, 조건, true이면, false이면)

 

-- 5. decode (조건문)
SELECT decode(comm, null, 0, comm) 보너스
FROM emp;

 

 

 

[출처]

https://cafe.naver.com/metacoding

 

메타코딩 : 네이버 카페

코린이들의 궁금증

cafe.naver.com


메타 코딩 유튜브
https://www.youtube.com/c/%EB%A9%94%ED%83%80%EC%BD%94%EB%94%A9

 

메타코딩

문의사항 : getinthere@naver.com 인스타그램 : https://www.instagram.com/meta4pm 깃헙 : https://github.com/codingspecialist 유료강좌 : https://www.easyupclass.com

www.youtube.com

 
반응형