Re: [sqlite] EXISTS and NULLs

2008-01-02 Thread Nemanja Čorlija
On Jan 2, 2008 5:44 PM, <[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); > > The final SELECT above returns

Re: [sqlite] EXISTS and NULLs

2008-01-02 Thread Ken
Oracle behavoir: SQL> create table t1 (x number); Table created. SQL> insert into t1 values (NULL); 1 row created. SQL> commit; Commit complete. SQL> SELECT EXISTS(SELECT x FROM t1 WHERE x NOT NULL); SELECT EXISTS(SELECT x FROM t1 WHERE x NOT NULL) * ERROR at line 1: ORA-00936: missin

Re: [sqlite] EXISTS and NULLs

2008-01-02 Thread Eugene Wee
Hi, MySQL 5.0.41 and Postgresql 8.2.5 work as you described in their treatment of NULL. There were some minor syntax tweaks for CREATE TABLE and the second SELECT EXISTS, but other than that it was true for the first SELECT EXISTS and false for the second SELECT EXISTS. Regards, Eugene Wee

RE: [sqlite] EXISTS and NULLs

2008-01-02 Thread Samuel R. Neff
ested contact [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 11:44 AM To: sqlite-users@sqlite.org Subject: [sqlite] EXISTS and NULLs The current behavior of SQLite is to not do anything special with NULLs in an E

Re: [sqlite] EXISTS and NULLs

2008-01-02 Thread Kees Nuyt
On Wed, 02 Jan 2008 16:44:12 +, [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 M

[sqlite] EXISTS and NULLs

2008-01-02 Thread drh
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); The final SELECT above returns 1 (true) because an entry exists in t1, even though that entry is