Section 4 — NULL and Empty Values

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:34 AM on 10/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

What does NULL mean in a database?

A value is missing, unknown, or not applicable.

2
New cards

Is NULL the same as 0?

No. Zero is a known numeric value; NULL means no known value.

3
New cards

Is NULL the same as an empty string?

No. An empty string has zero characters; NULL has no value.

4
New cards

How do you find NULL values?

Use IS NULL. Example: WHERE FirstPurchase IS NULL.

5
New cards

How do you find non-NULL values?

Use IS NOT NULL. Example: WHERE ContactPref IS NOT NULL.

6
New cards

How do you find an empty text value?

Use = ''. Example: WHERE Name = ''.

7
New cards

How do you find a nonempty text value?

Use != ''. Example: WHERE Name != ''.

8
New cards

Why can’t you write WHERE Field = NULL?

NULL is not compared using =; use IS NULL instead.

9
New cards

Example: customers with no first-purchase date

SELECT Name FROM Customer WHERE FirstPurchase IS NULL;

10
New cards

Example: customers with a contact preference

SELECT Name, ContactPref FROM Customer WHERE ContactPref IS NOT NULL;

11
New cards

What does an empty string contain?

Zero characters.

12
New cards

Why are NULL values important in calculations?

A calculation involving NULL often produces NULL because the value is unknown.