" 'isnull' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก
๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

isnull1

MYSQL ์ฝ”๋”ฉํ…Œ์ŠคํŠธ์—ฐ์Šต: ์ด๋ฆ„์ด ์žˆ๋Š” ๋™๋ฌผ์˜ ์•„์ด๋”” ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ด๋ฆ„์ด ์žˆ๋Š” ๋™๋ฌผ์˜ ์•„์ด๋”” ANIMAL_INS ํ…Œ์ด๋ธ”์€ ๋™๋ฌผ ๋ณดํ˜ธ์†Œ์— ๋“ค์–ด์˜จ ๋™๋ฌผ์˜ ์ •๋ณด๋ฅผ ๋‹ด์€ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. ANIMAL_INS ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE๋Š” ๊ฐ๊ฐ ๋™๋ฌผ์˜ ์•„์ด๋”” programmers.co.kr ํ•ด๋‹น ๊ธ€์€ Programmers ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต์„ ํ† ๋Œ€๋กœ MYSQL ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. Q ๋ฌธ์ œ: ์ด๋ฆ„์ด ์žˆ๋Š” ๋™๋ฌผ์˜ ์•„์ด๋”” A ๋ฌธ์ œํ’€์ด : -- ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š” SELECT ANIMAL_ID FROM ANIMAL_INS WHERE NOT ISNULL(NAME) ํ•ด๋‹น๋ฌธ์ œ๋Š” ๋ฐ์ดํ„ฐ ๊ฒฐ์ธก๊ฐ’ (NULL)์„ ์ œ์™ธํ•œ ๊ฐ’๋“ค์„ ์ถœ๋ ฅํ•˜๋Š” ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. E: .. 2021. 1. 14.
728x90
๋ฐ˜์‘ํ˜•