• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / NANVL Function in Oracle SQL – PLSQL

NANVL Function in Oracle SQL – PLSQL

November 28, 2012 by techhoneyadmin

Oracle SQL / PLSQL NANVL function allows us to substitute a value for a floating point number such a BINARY_FLOAT or BINARY_DOUBLE, when an SQL Not A Number (NAN) value is encountered.

The Oracle SQL NANVL function is most commonly used to convert Not A Number (NAN) values to either 0 or NULL.

Oracle SQL / PLSQL Syntax for the NANVL function is:

SELECT NANVL (value_1, replace_with)
FROM table_name;

  • value_1 is the BINARY_FLOAT or BONARY_NUMBER to be tested for a Not A Number (NAN)
  • the replace_with is the value that will be returned if value_1 is NAN.

Example of using Oracle SQL NANVL function

 SELECT NANVL(to_char(2),NULL)
FROM dual;

Will return NULL.


Filed Under: function Tagged With: how to substitute 0 or NULL for floating number using oracle sql NANVL function, How to use oracle sql plsql NANVL function with example, NANVLPLSQL, What is oracle sql plsql NANVL function

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in