Re: [sqlite] WHERE col IN tab

2016-09-19 Thread Dominique Devienne
On Fri, Sep 16, 2016 at 6:50 PM, Richard Hipp wrote: > On 9/16/16, Dominique Devienne wrote: > > Is that <> SQL standard? > > That feature was added to SQLite on 2004-01-15 > (http://sqlite.org/src/timeline?c=01874d25). I do not recall why I > added it. >

Re: [sqlite] WHERE col IN tab

2016-09-19 Thread James K. Lowden
On Fri, 16 Sep 2016 16:59:17 +0200 Dominique Devienne wrote: > Is that <> SQL standard? No. The two most frequently used pointless words in SQL are "select *". The SELECT clause (not statement) chooses columns; in relational algebra terms, it's a project operator. If

Re: [sqlite] WHERE col IN tab

2016-09-16 Thread Richard Hipp
On 9/16/16, Dominique Devienne wrote: > > Is that <> SQL standard? That feature was added to SQLite on 2004-01-15 (http://sqlite.org/src/timeline?c=01874d25). I do not recall why I added it. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] WHERE col IN tab

2016-09-16 Thread Dominique Devienne
On Fri, Sep 16, 2016 at 6:00 PM, J Decker wrote: > but probably what you mean is... > I didn't mean anything. I asked a question about an unusual syntax. > SELECT * FROM t1 join T2 on x=y; > SELECT * FROM t1 join (select y from t2) on x=y > A join works too, but that's

Re: [sqlite] WHERE col IN tab

2016-09-16 Thread J Decker
IN is for sets, not another table. I'm surprised sqlite didn't thrown an error but probably what you mean is... SELECT * FROM t1 join T2 on x=y; SELECT * FROM t1 join (select y from t2) on x=y select * from table where colName in (1,2,3,4) /// woud return rows where some column has a

[sqlite] WHERE col IN tab

2016-09-16 Thread Dominique Devienne
Reading https://www.sqlite.org/src/tktview/0eab1ac7591f, (from a very recent thread) I was surprised to read that syntax. So I tried it in SQLite, and it works as shown in the ticket: C:\Users\DDevienne>sqlite3 SQLite version 3.10.2 2016-01-20 15:27:19 sqlite> CREATE TABLE t1(x INTEGER PRIMARY