NVL: NULL VALUE LOGIC

Description of nvl.eps follows

NVL(expr1, expr2)

WHAT IS NVL?

NVL lets you replace null (returned as a blank) with a string in the results of the query

If expr1 is null, then NVL returns expr2

if expr1 is not nulol, then NVL return expr1

Handling Different Data Types

  • If expr1 is character data, then Oracle Database converts expr2 to the data type of expr1 before comparing them and returns VARCHAR2 in the character set of expr1.
  • If expr1 is numeric, then Oracle Database determines which argument has the highest numeric precedence, implicitly converts the other argument to that data type, and returns that data type.

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/NVL.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top