Skip to content

Glossary: SQL Beyond the Basics

NULLIF

Gives NULL when its two values are equal, and the first value otherwise. It turns unwanted values into NULL for aggregates to skip, and guards against dividing by zero with x / NULLIF(y, 0).

Where the book teaches it

Related terms

COALESCENULL