On Mon, Apr 30, 2012 at 09:50:34AM -0700, Pete scratched on the wall:
> Anyone?
>
> ---------- Forwarded message ----------
> From: Pete <[email protected]>
> Date: Thu, Apr 26, 2012 at 10:55 AM
> Subject: Expression syntax
> To: [email protected]
>
>
> 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
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users