COALESCE()
COALESCE() Method taking list of values.
Returns not null value at first occurance of the list, otherwise null when all list values are null.
|
-- returns one
SELECT COALESCE("one","two","three");
-- returns two
SELECT COALESCE(null,"two","three");
-- returns one
SELECT COALESCE("one",null,"three");
-- returns three
SELECT COALESCE(null,null,"three");
-- returns null
SELECT COALESCE(null,null,null);
|