>> SELECT COUNT(*) FROM A,B > >Is "A,B" a way of expressing "A JOIN B" ? I've never seen it before.
Yes. It is part of the SQL language definition since before there was an SQL language definition. "," means "JOIN" or more pedantically "INNER JOIN". "ON" means "WHERE". The only circumstance in which you need to replace the "," with "JOIN" is if you are using a join predicate such as "NATURAL" or "USING" (or in the case of SQLite, "CROSS", to indicate that you do not want visitation order changed). In all cases except outer joins "ON" is mere syntactic sugar for putting join conditions in the WHERE clause (including NATURAL and USING forms where the appropriate join condition is merely a clause in the WHERE clause and otherwise has no special significance). OUTER joins must use the verbose join syntax because the conditionals in the ON condition of an OUTER join cannot be re-ordered without changing the semantics of the query, although there are other more-or-less standard ways of describing outer joins without using the OUTER JOIN ... ON syntax, such as designating the OUTER join conditions that "would otherwise follow ON" using *= or =* where the * designates the "outer" side of the equijoin condition. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users