coalesce mysql
snippet in sql

coalesce mysql

user8916

The COALESCE() function returns the first non-null value in a list.

Example : SELECT COALESCE(NULL, NULL, 'W3Schools.com', NULL, 'Example.com');

output : 'W3Schools.com'