This is an old revision of the document!
The COALESCE function returns the first non-NULL expression among its arguments.
This function returns the same datatype as the passed parameter. If all passed parameters are NULL, then this function returns a NULL.
COALESCE ( expression [ , expression ... ] )
Required. An expression using SQL language that produces a value. A scalar expression is generally equivalent to a select item in the SQL SELECT statement, and can be a character expression, numeric expression or date expression.
> select coalesce(name, individual) identifier from individuals; IDENTIFIER -------------------------------------------------- MS. MARY LEWIS MRS. ALICE R TOLLIVER MR. SIDNEY K TOLLIVER MRS. JENNIFER J HOPKINS MR. CHARLIE HOPKINS MS. KIMBERLY BLUE KATHLEEN TUCKER
See also: