On Wed, 02 Jan 2008 16:44:12 +0000, [EMAIL PROTECTED] wrote: >The current behavior of SQLite is to not do anything special >with NULLs in an EXISTS operator. For example: > > CREATE TABLE t1(x); > INSERT INTO t1 VALUES(NULL); > SELECT EXISTS(SELECT x FROM t1); > >Can somebody tell me what MySQL, PostgreSQL, Oracle, >and Firebird do in this case?
Server version: 5.0.41-community-nt-log MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE TABLE t1(x); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 mysql> CREATE TABLE t1(x INTEGER); Query OK, 0 rows affected (0.11 sec) mysql> INSERT INTO t1 VALUES(NULL); Query OK, 1 row affected (0.00 sec) mysql> SELECT EXISTS(SELECT x FROM t1); +--------------------------+ | EXISTS(SELECT x FROM t1) | +--------------------------+ | 1 | +--------------------------+ 1 row in set (0.02 sec) -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------