programmers SQL 고득점 Kit - IS NULL 문제 코드

Giyu·2021년 12월 9일
post-thumbnail

https://programmers.co.kr/learn/courses/30/parts/17045


  1. 이름이 없는 동물의 아이디
select animal_id
from animal_ins
where name is null;
  1. 이름이 있는 동물의 아이디
select animal_id
from animal_ins
where name is not null;
  1. NULL 처리하기
select animal_type, coalesce(name, "No name"), sex_upon_intake
from animal_ins;
profile
Data Analysis Log

0개의 댓글