SQL/IS NULL
[프로그래머스 ORACLE SQL]NULL 처리하기★CASE WHEN THEN★NVL()
goAhEAd_29
2023. 6. 22. 16:31
728x90
반응형
https://school.programmers.co.kr/learn/courses/30/lessons/59410
VERSION 2.0
SELECT ANIMAL_TYPE , CASE WHEN NAME IS NULL THEN 'No name' ELSE NAME END AS NAME, SEX_UPON_INTAKE
FROM ANIMAL_INS
ORDER BY ANIMAL_ID
==> CASE WHEN THEN 활용
VERSION 1.0
SELECT ANIMAL_TYPE , NVL(NAME , 'No name') AS NAME , SEX_UPON_INTAKE FROM ANIMAL_INS
ORDER BY ANIMAL_ID
==> NVL 활용
728x90
반응형