nvl

description

Syntax

nvl(expr1, expr2)

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

example

  1. mysql> select nvl(1,0);
  2. +--------------+
  3. | nvl(1, 0) |
  4. +--------------+
  5. | 1 |
  6. +--------------+
  7. mysql> select nvl(null,10);
  8. +------------------+
  9. | nvl(NULL, 10) |
  10. +------------------+
  11. | 10 |
  12. +------------------+

keywords

NVL