What does `NULLIF(a, b)` return?

Advanced SQL Developer Medium

Advanced SQL Developer — Medium

What does `NULLIF(a, b)` return?

Key points

  • `NULLIF(a, b)` compares two values and returns NULL if they are equal
  • The function is useful for handling cases where you want to avoid returning a specific value
  • It helps in simplifying conditional logic in SQL queries

Ready to go further?

Related questions