At 3:45 PM -0500 6/5/01, Mark Stosberg wrote:
>Jeremy Zawodny wrote:
>>
>>  On Tue, Jun 05, 2001 at 02:18:15PM -0500, Mark Stosberg wrote:
>>  >
>>  > However, if I ask for the rows where last_visit = NULL, it says there are
>>  > not any! :
>>  > mysql> select user_id,screen_name,password,last_visit,
>>  > second_to_last_visit from users where  last_visit = NULL;
>>
>>  What if you use "last_visit IS NULL"?
>>
>>  (Hint: That's the correct syntax.)
>
>Thanks, this works. I still think MySQL behaved poorly by not either:
>a), accepting my syntax, or B.) throwing an error that the syntax was
>incorrect. The result it returned appeared incorrect.

The syntax isn't incorrect.  It's perfectly legal.  It simply didn't
reflect the semantics that you intended.

It's no more nonsense than WHERE 1 = 0.  That appears not to make
sense on the face of it, but it has its uses.

>
>   -mark
>
>http://mark.stosberg.com/



-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to