Files
doris/docs/en/sql-reference/sql-functions/conditional-functions/ifnull.md
steadyBoy 3d30209e9b [docs] add document conditional-functions (#8339)
Add conditional-functions.
2022-03-09 13:05:13 +08:00

1.2 KiB

title, language
title language
ifnull en

ifnull

description

Syntax

ifnull(expr1, expr2)

If the value of expr1 is not null, expr1 is returned, otherwise expr2 is returned

example

mysql> select ifnull(1,0);
+--------------+
| ifnull(1, 0) |
+--------------+
|            1 |
+--------------+

mysql> select ifnull(null,10);
+------------------+
| ifnull(NULL, 10) |
+------------------+
|               10 |
+------------------+

keyword

IFNULL