PG SQL πŸ“Œ IS NULL

imsΒ·2021λ…„ 2μ›” 23일
0

SQL

λͺ©λ‘ 보기
10/12

πŸ“Œ IS NULL

null인 κ°’ μ°ΎκΈ°

SELECT ANIMAL_ID FROM ANIMAL_INS WHERE name is null ORDER BY ANIMAL_ID
  • null 이 μ•„λ‹λ•ŒλŠ”
is not null

πŸ“Œ IFNULL

이름이 null 일 경우 No name으둜 좜λ ₯ν•˜κΈ°

SELECT ANIMAL_TYPE, IFNULL(NAME,'No name') AS NAME,SEX_UPON_INTAKE
FROM ANIMAL_INS
ORDER BY ANIMAL_ID
profile
ν‹°μŠ€ν† λ¦¬λ‘œ μ΄μ‚¬ν–ˆμŠ΅λ‹ˆλ‹€! https://imsfromseoul.tistory.com/ + https://camel-man-ims.tistory.com/

0개의 λŒ“κΈ€