jose <[EMAIL PROTECTED]> writes: > I think I found a bug using the IN operator. > select * from t where b not in (11,22,NULL);
This is not a bug. The behavior of NOT IN with NULLs is not very intuitive but it is correct according to the SQL standard. The result can only be FALSE (when b is 11 or 22, IN is definitely TRUE, so NOT IN is definitely FALSE) or NULL (for anything else, the result is UNKNOWN). Either way, this query will select no rows. > I tried the same quesry in mysql and it give me > a different result. Who are right? If mysql gets this wrong, then they are not implementing NULLs per SQL spec. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly