Both are different yet confused most of the times. Coalesce() takes a list of values and returns the first non-null value. If there is no non-null value,it will return the null value whereas nullif() takes two values and returns the first value. If both values are equal, it returns null.
See this example to understand in detail.
Leave a comment