Hi Mario,

thats an SQL definition thing, comparing 'NULL' against
something else using operators other than 'IS' 
(e.g. =, <>, <, 'LIKE', etc.) is _defined_ to yield
'false', even 'NULL=NULL' evaluates to 'false'.

Motivation behind that is that 'NULL' is not seen
as a value, it means 'no value available'.
Setting comparisons against 'NULL' to 'false'
is just a convention the inventors of SQL
thought to be the most sane of all the options 
('false' 'true' and 'NULL').
(i.e. 'true' would lead to cluttered resultsets in 
 many cases and 'NULL' would require cumbersome 
 semantic changes in SQL's 'WHERE' clause.)

regards

Markus Stausberg
SAP Labs Berlin
 

-----Original Message-----
From: Mario Oberrauch [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: '1' <> NULL ?


hi there,

i've just tried the following:
SELECT whatever FROM table WHERE column <> '1'
revealing that no rows are returned that have column=NULL.

Defenitly it's simple to work-around with an "OR IS NULL", but im quite
unsure how this fits. My way to come was "everything is other than '1'
except '1', therefore an undefined value is also other than '1'". 

i may be wrong (and it seems i am - the hours to figure that out speak
for themselfs), so, somebody can give a hint what's truth about?

best regards,
Mario Oberrauch


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to