Sunday, June 16, 2013

Don't Use Nested IFNULL, Use COALESCE - MySQL

If you're looking for how to do a nested IFNULL, you probably need to be looking at how to use COALESCE instead. It returns the first non-null item in a list.

Example:
SELECT COALESCE(NULL,1);

Returns 1

No comments:

Post a Comment