Thursday , September 28 2023

Nullif In PostgreSQL

In today’s article, we will be explaining what is nullif in PostgreSQL and how to use it.

The nullif function returns NULL if the two values specified in parentheses are the same.

If two values are different from each other, it returns the first given value.


As seen above, Null value is returned when two same values are entered.

Let’s see what it does when different values are entered.

As seen above, when two separate values are entered, the first value specified in parentheses is taken.


About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *