Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

COALESCE in Oracle

COALESCE is used to go through the expressions until it finds a NOT NULL value. If the last expression itself is NULL then NULL will be the output from coalesce.

In the below example, coalesce will start evaluating expr1. If it is NULL then it will go to expr2 and evaluates. If the expr2 is not null then the value will be the output from coalesce. If expr2 is null, then expr3 will be the output even it is NULL.
COALESCE (expr1, expr2, expr3)


Example:
COALESCE(0.9*list_price, min_price, 5)


Important: All fields/expression should be of same datatype.