Oracle PL/SQL/Conversion Functions/COALESCE
Версия от 13:45, 26 мая 2010; (обсуждение)
COALESCE() returns the first non-null expression in the expression list
Syntax: COALESCE (<exp1>,<exp2> . . . <expN>)
SQL>
SQL> SELECT COALESCE (NULL, NULL, "NOT NULL", NULL) test from dual;
TEST
--------
NOT NULL
SQL>
SQL>
select coalesce( null, "", "A" )
SQL>
SQL> select coalesce( null, "", "A" )
2 from dual;
C
-
A
1 row selected.
SQL>
SQL> --
select coalesce( null, sysdate )
SQL>
SQL> select coalesce( null, sysdate )
2 from dual;
COALESCE(
---------
16-JUN-08
1 row selected.
SQL>
SQL>
SQL> --