Home >Database >Mysql Tutorial >What does the MySQL COALESCE() function return if its first argument is blank but not NULL?
MySQL COALESCE() function returns null if the first parameter is null. This is because null is also a non-NULL value, and we know that the COALESCE function always returns the first non-NULL value as a result. The following example will demonstrate this situation −
mysql> Select COALESCE('','Ram'); +--------------------+ | COALESCE('','Ram') | +--------------------+ | | +--------------------+ 1 row in set (0.00 sec)
The above is the detailed content of What does the MySQL COALESCE() function return if its first argument is blank but not NULL?. For more information, please follow other related articles on the PHP Chinese website!