Conditional Functions

CASE

Case expressions execute statements based on one or more conditions.

Syntax


# Usage 1   
CASE expression   
     WHEN expression THEN statements [ ...n ]
     [ ELSE statements ]  
END   

# Usage 2
CASE  
     WHEN expression THEN statements [ ...n ] 
     [ ELSE statements ]   
END

COALESCE

Returns the first expression that is not null from its arguments.

Syntax

COALESCE(expression1[, ... n])

NULLIF

If both expressions are equal returns a null value of the type of expression1, if not returns expression1.

Syntax

NULLIF(expression1, expression2)

results matching ""

    No results matching ""