跳到主要内容
跳到主要内容

COALESCE

coalesce

description

Syntax

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

返回参数中的第一个非空表达式(从左向右)

example

mysql> select coalesce(NULL, '1111', '0000');
+--------------------------------+
| coalesce(NULL, '1111', '0000') |
+--------------------------------+
| 1111 |
+--------------------------------+

keywords

COALESCE