* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-01-02 17:50]:
> If you wanted to know if there were non-null entries you would
> say:
>
> SELECT EXISTS(SELECT x FROM t1 WHERE x NOT NULL);
In fact I usually say
EXISTS ( SELECT NULL FROM ... )
in order to emphasize that the row data is of no interest in the
subquery in question.
> Can somebody please confirm that this is the correct behavior
> and that EXISTS does not do any special treatment of NULL
> values?
I have seen the above EXISTS SELECT NULL in several books, with
the collective implication that this construct must work in
MySQL, Postgres, Oracle, DB2, SQL Server and Sybase.
It’s a safe bet that SQLite works as expected.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------