coalesce

description

Syntax

coalesce(expr1, expr2, ...., expr_n)

Returns the first non empty expression in the parameter (from left to right)

example

1. mysql> select coalesce(NULL, '1111', '0000');
2. +--------------------------------+
3. | coalesce(NULL, '1111', '0000') |
4. +--------------------------------+
5. | 1111                           |
6. +--------------------------------+

keywords

COALESCE