Replace null values with default values in oracle select column

By Santhosh N

Oracle provides a simple function to find and replace null values with the predefined values in select statements

Oracle provides the NVL function which is used to replace the null values with the default values which makes substitution of null values and comparision makes much more easier

The syntax to use NVL function in oracle is

NVL(ColName, replace_with)

ex:

1. NVL(Address, 'n/a')
2. NVL(Sal, 0)
3. Select empnames from emp where NVL(sal, 0) = 0;

Replace null values with default values in oracle select column  (5006 Views)