
August 9th, 2006, 03:35 PM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 11
Time spent in forums: 2 h 50 m 56 sec
Reputation Power: 0
|
|
|
[ANSI] Conditional for NULL values?
Hey everyone,
Because these sorts of queries always work:
Code:
INSERT INTO table(field) VALUE(NULL);
UPDATE table SET field=NULL;
Earlier today I attempted a simple query like this one, didn't think anything of it:
Code:
SELECT * FROM table WHERE field=NULL;
But of course, it didn't work (at least on my MySQL server). So I did some searching and changed it to this:
Code:
SELECT * FROM table WHERE field IS NOT NULL;
Which works. My question is: Is this last query ANSI (99+) valid? If not, is there an ANSI conditional for NULL values?
|