I'm using SQLite 3.8.10.2 and the following query illustrates the problem: WITH tA(id, name) AS ( SELECT 1, "a" UNION ALL SELECT 2, "b" ), tB(name) AS ( SELECT "a" UNION ALL SELECT "b" ) SELECT tB.id FROM tA INNER JOIN tB ON (tA.name = tB.name);
There is no _id_ column in the tB table, yet the statement doesn't produce any error and in fact will return the ids of table tA. This doesn't seem correct to me. -- *Jo?o Ramos*