VeloDB Cloud
SQL Manual
Functions
conditional-functions
nvl

nvl

Description

Syntax:

nvl(expr1, expr2)

If the value of expr1 is not null, this function will return expr1; otherwise, it will return expr2.

Example

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

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

Keywords

NVL