Skip to content

Glossary: SQL Basics

CASE

Also written: CASE WHEN, WHEN, THEN, ELSE, END

An expression, like a spreadsheet IF, that gives a value from the first WHEN condition that is true, or the ELSE value if none are. Without ELSE, unmatched rows get NULL.

Where the book teaches it

Related terms

ConditionNULL