๋ฐ์ํ
1. ์ด๋ฆ์ด ์๋ ๋๋ฌผ์ ์์ด๋ |
[์ ๋ต ์ ์ด๋์]
๋๋ณด๊ธฐ
-- ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์
SELECT
ANIMAL_ID
FROM
ANIMAL_INS
WHERE
NAME IS NULL
ORDER BY
ANIMAL_ID;
2. ์ด๋ฆ์ด ์๋ ๋๋ฌผ์ ์์ด๋ |
[์ ๋ต ์ ์ด๋์]
๋๋ณด๊ธฐ
-- ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์
SELECT
ANIMAL_ID
FROM
ANIMAL_INS
WHERE
NAME IS NOT NULL
ORDER BY
ANIMAL_ID
3. NULL ์ฒ๋ฆฌํ๊ธฐ |
[์ ๋ต ์ ์ด๋์]
๋๋ณด๊ธฐ
-- ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์
SELECT
ANIMAL_TYPE,
IFNULL(NAME,"No name") AS NAME,
SEX_UPON_INTAKE
FROM
ANIMAL_INS
ORDER BY
ANIMAL_ID;
๋ฐ์ํ
'โ๏ธ ์ด๋ก > ๋คํธ์ํฌ, ๋ฐ์ดํฐ๋ฒ ์ด์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ํ๋ก๊ทธ๋๋จธ์ค/์ฟผ๋ฆฌ๋ฌธ ์ฐ์ต] String, Date (0) | 2019.12.23 |
---|---|
[ํ๋ก๊ทธ๋๋จธ์ค/์ฟผ๋ฆฌ๋ฌธ ์ฐ์ต] JOIN (0) | 2019.12.23 |
[ํ๋ก๊ทธ๋๋จธ์ค/์ฟผ๋ฆฌ๋ฌธ ์ฐ์ต] GROUP BY (0) | 2019.12.01 |
[ํ๋ก๊ทธ๋๋จธ์ค/์ฟผ๋ฆฌ๋ฌธ ์ฐ์ต] SUM, MAX, MIN (0) | 2019.12.01 |
[ํ๋ก๊ทธ๋๋จธ์ค/์ฟผ๋ฆฌ๋ฌธ ์ฐ์ต] SELECT (0) | 2019.12.01 |