CASE
WHEN
THEN
END
์์
https://programmers.co.kr/learn/courses/30/lessons/59409
SELECT ANIMAL_ID, NAME,
CASE WHEN
SEX_UPON_INTAKE LIKE 'Neutered%' OR SEX_UPON_INTAKE LIKE 'Spayed%'
THEN 'O' ELSE 'X'
END AS ์ค์ฑํ
FROM ANIMAL_INS
ORDER BY ANIMAL_ID
'DB > SQL' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
SQL - UPPER(), ROWER() (0) | 2022.06.17 |
---|---|
SQL - ์ฐ์ฐ์ IN (0) | 2022.06.17 |
SQL - JOIN (0) | 2022.06.14 |
SQL - NVL() (0) | 2022.06.14 |
SQL - HAVING (0) | 2022.06.13 |