Hi,

> I'm guessing that it is just a syntax 
> thing...somewhere in the SQL
> Server engine, it makes it easier for them to 
> handle the comparison. 

well, as Neil already said, NULL is not a value and thus can not be compared to 
any other value or field content. NULL actually means the field content is not 
existing. 

Taken from MySQL documentation:
[quote]In SQL, the NULL value is never true in comparison to any other value, 
even NULL. An expression that contains NULL always produces a NULL value unless 
otherwise indicated in the documentation for the operators and functions 
involved in the expression.[/quote]

And a little further:
[quote] If you want to search for column values that are NULL, you cannot use 
an expr = NULL test. The following statement returns no rows, because expr = 
NULL is never true for any expression:

mysql> SELECT * FROM my_table WHERE phone = NULL;[/quote]

> Oddly, the update isn't like that...when you set 
> a column to NULL, you
> use "col_name = NULL", not something like 
> "col_name TO BE NULL"

No offense intended, but the difference between assingment and comparison 
should be obvious. This is absolutely not "just the way it is in SQL server", 
but pure database and SQL fundamentals. The ppl. who developed SQL by no way 
made it like this by mistake or by accident. It was meant to be this way, and 
not just in SQL server. 

Again, absolutely no offense intended, but, if NULLs are unclear to you guys, I 
recommend you get yourself a good book on database basics, unless you want to 
run into some serious trouble with databases sooner or later. 

Best,

Chris


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231726
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to