postgreSQL COALESCE
Introduction
Coalesce returns the first none null argument from a set of arguments. Only the first non null argument is return, all subsequent arguments are ignored. The function will evaluate to null if all arguments are null.
Examples
Single non null argument
PGSQL> SELECT COALESCE(NULL, NULL, 'HELLO WORLD');
coalesce
--------
'HELLO WORLD'