In PL/SQL V1, the LENGTH function applied to a null expression resolves to
zero. In versions after V1, the LENGTH
function applied to a null
expression resolves to null.
To preserve V1 behavior, the PL/SQL conversion utility adds the NVL
SQL predicate to ensure that the LENGTH
function applied to a null
expression resolves to zero.
The conversion utility converts this PL/SQL V1 code:
c:=null;
l=LENGTH( c );
In V1, this resolves to 0
. . . to this:
c:=null;
l=NVL(LENGTH( c ),0);
(Converter wraps LENGTH function with NVL( ) built-in, forcing the expression
to resolve to 0
)
About the PL/SQL conversion utility
Copyright © 1984, 2005, Oracle. All rights reserved.