| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: '' IS NULL?
Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK> wrote >
>They ARE the same thing. Oracle explicitly states that '' is NULL.
> >
> >Reinier.
> >
> Hmm.. Missed that then. I'll keep an eye out for that in the docs.
> Thanx.
>
> Brian
>
Just for your information, the following text comes from the PL/SQL user
guide and reference version 8.0:
Zero-Length Strings
PL/SQL treats any zero-length string like a null. This includes values
returned by character functions
and Boolean expressions. For example, the following statements assign nulls
to the target variables:
null_string := TO_VARCHAR2('');
zip_code := SUBSTR(address, 25, 0);
valid := (name != '');
So, use the IS NULL operator to test for null strings, as follows:
IF my_string IS NULL THEN ...
Regards,
Reinier. Received on Mon Dec 11 2000 - 09:22:23 CST
![]() |
![]() |