NVL function is used to substitute null values with another not null value.
The syntax for NVL function is:
NVL(original, ifnull)
If the value of ‘original’ parameter is null, it returns the value of ‘ifnull’ parameter
Example: D:\app\Admin\virtual\virtual\product\12.2.0\dbhome_1\bin>sqlplus/nolog SQL*Plus: Release 12.2.0.1.0 Production on Fri Feb 25 16:17:57 2022 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> conn mereba/mereba@orcl Connected ---When the 'original' value is null SQL> select NVL(null, 'MerebaTech') as value from dual; VALUE ---------- MerebaTech ---When the 'original' value is not null SQL> select NVL('Information', 'MerebaTech') as value from dual; VALUE ----------- Information --- When the 'original' is not null and the 'ifnull' is null SQL> select NVL('Information', null) as value from dual; VALUE ----------- Information
meda Changed status to publish 01/03/2022