Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: '' IS NULL?

Re: '' IS NULL?

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Tue, 12 Dec 2000 16:44:35 GMT
Message-ID: <3a3655ed.1872567125@news.alt.net>

On Mon, 11 Dec 2000 16:22:23 +0100, "R. Dickhout" <Reinier_Dickhout_at_hetnet.nl> wrote:

>
>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.
>
>

Thanx.

Brian Received on Tue Dec 12 2000 - 10:44:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US