Coalesce

From Oracle FAQ
(Redirected from COALESCE)
Jump to: navigation, search

Coalesce is an SQL function that returns the first expression that is NOT NULL.

Examples[edit]

SELECT COALESCE(NULL, '2', '5') FROM dual;
SELECT 'Dear '||COALESCE(preferred_name, first_name, 'Sir or Madam')
  FROM emp2;

Also see[edit]

Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #