Null values
Coddy SQL 여정의 기초 섹션에 포함된 레슨 — 72개 중 12번째.
현실 세계에서는 값이 없는 필드가 있을 수 있습니다. 값이 없는 필드는 null이라고 합니다.
IS NULL 또는 IS NOT NULL을 사용하여 쿼리를 조작하여 관련 데이터를 가져올 수 있습니다
예를 들어 다음 쿼리는 col1에 값이 없는 모든 레코드를 반환합니다:
SELECT *
FROM table1
WHERE col1 IS NULL챌린지
쉬움사용 가능한 테이블과 열:
<strong>people</strong>:<strong>name</strong>
누락된 값 없이 고유한 모든 이름을 가져오세요.
치트 시트
IS NULL과 IS NOT NULL을 사용하여 누락된 값을 기반으로 레코드를 필터링하세요:
SELECT *
FROM table1
WHERE col1 IS NULLSELECT *
FROM table1
WHERE col1 IS NOT NULL직접 해보기
이 레슨에는 짧은 퀴즈가 포함되어 있습니다. 레슨을 시작해 문제를 풀고 진행 상황을 기록하세요.
기초의 모든 레슨
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columns