Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Weird Query
Maxim Demenko <mdemenko_at_arcor.de> wrote:
>Marian Aldenhövel schrieb:
>> Hi,
>>
>>> It is very simply: WHERE column IS NOT NULL
>>> Nothing more.
>>
>>
>> And it does work fine.
>>
>>> There is *NO* distiction in Oracle
>>
>>
>> (between NULL and an empty string)
>>
>> Which makes IS NOT NULL the safe choice. I was confused because
>> other systems do make a distinction here.
>There are indeed a lot of "templates" implemented in IT world. It means,
>if you have worked on HP-UX, you probably will be able to handle
>intuitiv on Linux and do the right things , if you write C++, you can
>read Java without to learn it and so on (one of my friends said "the
>life itself is copy'n'paste process"). But often that can be a trap and
>then only the right way is to read the manuals. (Which is of course
>always recommended , but very time expensive ).
>Just for the record:
>> A numeric zero is still different from a NULL value in Oracle
>> is it?
>I'm pretty sure, now you can easily build the test, to proof it.
>>
>>> It is wrong expectation. You can blindly substitute '' by NULL, in
>>> that case you get 2 WHERE conditions
>>> WHERE "PP_LOCK"=NULL
>>> and
>>> WHERE "PP_LOCK"<>NULL
>>> both are wrong
>>
>>
>> I would never have tried these. I _know_ they are wrong :-).
>>
>> Ciao, MM
>
>Best regards
>
>Maxim
Just to keep it clear:
In the Oracle world NULL is special -
It is not = to anything ( including itself)
It is not <> to anything ( including itself)
It is not the same as a Blank ( ' ')
In Oracle, it is the same as an empty string (''), which is not the same as a blank ( having 1 or more spaces) string.
It is not the same as 0 for numeric data.
NULL means, in Oracle speak, Undeterminable...so something can ONLY be NULL or NOT NULL - you can either determine something about it or Not.
Hope it helps..
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- Received on Mon Aug 01 2005 - 10:12:19 CDT
![]() |
![]() |