Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: empty string, NULL, NOT NULL
Mehta,
Unlike other languages, like Foxpro, there is no
distinction between empty string and null.
You may not specify an assignment in Oracle as
Str := '';
Thus,
X := 'abcd';
and
X := NULL;
are your choices.
And you test for string as follows
If x = 'abcd'
If x IS NULL or If x IS NOT NULL
If NVL(x, 'something') = 'something'
HTH
Robert Proffitt
In article <852e39$vmr$1_at_nnrp1.deja.com>,
x3x3_at_my-deja.com wrote:
> Hello,
>
> could you tell me for a field what these things would mean viz.
> if I say a colume as allows NULL and then if its varchar2,
> could I use in where clause empty string?
> where col = ''
> I tried it and it was not matching it. so could one explain me if
> '' and NULL are same or is '' a valid empty string.
>
> Then when I say the col as NOT NULL can I insert '' into it for
> varchar2.
>
> I guess If am clear with my doubt would you email me at:
>
> mehta_at_mama.indstate.edu
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Jan 06 2000 - 10:46:44 CST
![]() |
![]() |