COALESCE Expression | VantageCloud Lake - COALESCE Expression - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Returns the value of the first non-null argument in the scalar_expression list, if there is one. Otherwise, returns NULL.

COALESCE is a shorthand expression for the following full CASE expression:

   CASE 
    WHEN  scalar_expression_1  IS NOT NULL 
    THEN  scalar_expression_1  
    ...
    WHEN  scalar_expression_n  IS NOT NULL 
    THEN  scalar_expression_n  
    ELSE NULL 
   END

Default Title

The default title for a COALESCE expression appears as:

<CASE expression>

ANSI Compliance

This statement is ANSI SQL:2011 compliant.