What does the NULLIF(a, b) function return?

SQL Data Analyst Hard

SQL Data Analyst — Hard

What does the NULLIF(a, b) function return?

Key points

  • NULLIF(a, b) returns NULL if a equals b
  • Otherwise, it returns the value of a
  • Helpful for replacing specific values with NULL
  • Useful for data cleaning and manipulation

Ready to go further?

Related questions