Thanks you Jay and other for the clarification. The fact that the table can only have one column is what was missing from my understanding of how this works. Jay, I think you just persuaded me to buy your book! Pete
On Tue, May 1, 2012 at 9:00 AM, <sqlite-users-requ...@sqlite.org> wrote: > Message: 5 > Date: Mon, 30 Apr 2012 12:03:59 -0500 > From: "Jay A. Kreibich" <j...@kreibi.ch> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Subject: Re: [sqlite] Fwd: Expression syntax > Message-ID: <20120430170359.gc45...@dfjk.org> > Content-Type: text/plain; charset=us-ascii > > On Mon, Apr 30, 2012 at 09:50:34AM -0700, Pete scratched on the wall: > > Anyone? > > > > ---------- Forwarded message ---------- > > From: Pete <p...@mollysrevenge.com> > > Date: Thu, Apr 26, 2012 at 10:55 AM > > Subject: Expression syntax > > To: sqlite-users@sqlite.org > > > > > > The syntax diagram for an expression using the IN/NOT IN operators shows > an > > option to specify database.tablename as the right operand. What does > > database.tablename evaluate to? > > Using SQLite, Appendix D (Expression Reference), "IN", p355: > > The last way to define the test group is by providing a > table name. The table must consist of only a single > column. You cannot provide a table and column, it must > be a single-column table. This final style is most > frequently used with temporary tables. If you need to > execute the same test multiple times, it can be more > efficient to build a temporary table (for example, with > CREATE TEMP TABLE...AS SELECT), and use it over and over, > rather than using a subquery as part of the IN expression. > > > If you provide a reference to a single-column table, the contents > of the table will be used as the right-hand list of the IN expression. > It's a short cut for the sub-select "(SELECT * FROM database.tablename)". > > -j > > > -- > Jay A. Kreibich < J A Y @ K R E I B I.C H > > > "Intelligence is like underwear: it is important that you have it, > but showing it to the wrong people has the tendency to make them > feel uncomfortable." -- Angela Johnson > -- Pete Molly's Revenge <http://www.mollysrevenge.com> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users