Files
doris/docs/en/sql-manual/sql-functions/conditional-functions/ifnull.md
jiafeng.zhang 267e8b67c2 [refactor][doc]The new version of the document is online (#9272)
replace the `docs/` with `new-docs/`
2022-04-28 15:22:34 +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