On Wed, Feb 23, 2011 at 07:21:22AM -0800, Wiktor Adamski scratched on the wall: > > If you join > > tables which have the same column names, you need to use the table names. > > You are right, but joined tables don't have the same column names.
When I say "join tables" I'm referring to the collective output of ALL join operations in a statement, not individual JOIN expressions. JOINs are associative, so the individual ordering and grouping doesn't really matter, only the final result. So, even in the given statements, the query optimizer may join t1 directly to t3, and then mix in t2. You're assuming "...FROM t1 JOIN t2 ... JOIN t3..." is being processed as "... FROM ( ( t1 JOIN t2 ) ... JOIN t3 )..." and that assumption is wrong. -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 sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users