# Three-Valued Logic

SQL logic in which a condition can be true, false, or unknown.

## What is **Three-Valued Logic** in a relational database?

**Three-Valued Logic** — SQL logic in which a condition can be true, false, or unknown.

```sql
SELECT customer_id
FROM customer
WHERE phone_number = NULL;
-- The comparison is UNKNOWN; use IS NULL instead.
```

Level: Master · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/master)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/three-valued-logic
