>Gerald Clark wrote:
> >
> > You need to read up on what NULL means.
> > There is nothing that = NULL.
> >
> > try:
> > WHERE last_visit IS NULL
>
>I _do_ understand what NULL means. Watch this: (with Postgres):
>
>mark=> insert into t (c2) values (NULL);
>INSERT 2419008 1
>mark=> select * from t where c2 = NULL;
> c1 | c2
>----+----
> 3 |
>(1 row)
>##############
>
>Look! It did what I intended! MySQL, on the other hand, gave an a result
>that didn't make sense (if you missed the subtlety). It should either
>give the expected result, or throw an error that the syntax was wrong.
>
> -mark
PostgreSQL gave an answer that didn't make sense. The answer is
illogical and doesn't comply with the ANSI standard (either 89 or
92). This is one of the few areas where PostgreSQL is not compliant
and MySQL is. All comparisons with NULL should return UNKNOWN, and a
WHERE clause should only return rows where the WHERE condition is
TRUE, not FALSE or UNKNOWN. You made a logic error, not a syntax
error, and MySQL gave you the correct result.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database
---------------------------------------------------------------------
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 <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php