2006/5/24, Tomas Simecek <[EMAIL PROTECTED]>:
Hi,
Version 7.6.00.16 on linux, when used stmnt like:
SELECT * FROM tbl WHERE col IN (NULL, 1, 8, 9 ) does not return any
result, however if used:
SELECT * FROM tbl WHERE col IN (1, 8, 9, NULL ) or SELECT * FROM tbl
WHERE col IN (1, 8, 9) it works correctly.
It also works in case, that there is NULL and only one other condition,
and then NULL can be at first place ( IN (NULL, 1) - this works. )
- is that fixed in newer release ?
- is there any workaround for 7.6.00.16 ?
"NULL" is a peculiar value to use in IN clauses. There was a recent
discussion in one of the comp.databases.* newsgroups that might help
here - unfortunately I can't seem to find it right now. However, I'm
not even sure that the SQL standard defines behavior for this
situation with a NULL in an IN clause. Order of elements in the IN
clause still probably should not make a difference but if behavior is
undefined anyway...
Kind regards
robert
--
Have a look: http://www.flickr.com/photos/fussel-foto/
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]