Skip to content
masterclass Buddy

PostgreSQL · Function

nullif

NULLIF(value1, value2) returns NULL when its two arguments are equal. Otherwise, it returns the first argument.

Last updated

Syntax

NULLIF(value1, value2)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • CASE
  • COALESCE
  • =

Source: PostgreSQL: Documentation: 18: 9.18. Conditional Expressions. Checked 2026-11-03.