What is the usage of the oracle nvl() function?

The NVL() function in Oracle is used to replace a null value.

Its syntax is: NVL(expr1, expr2)

NVL() function will return the value of expr1 if the expression is not NULL, otherwise it will return the value of expr2.

For example, suppose there is a table named table1 with a column named column1. To replace null values in the column1 column, you can use the NVL() function with the following statement:

Choose column1 from table1, if it is null then display ‘NA’.

The statement above will return the value of column1, and if that value is empty, it will return ‘NA’.

bannerAds