Skip to content

Glossary: SQL Beyond the Basics

CASE expression

Also written: CASE, CASE WHEN

A value chosen by testing conditions from the top and using the result of the first true one. If none are true and there's no ELSE, the result is NULL.

Where the book teaches it

Related terms

Conditional aggregationiif