I'm not sure if this is expected/desired behavior, but I think it is incorrect:
$ sqlite3 SQLite version 3.7.8 2011-09-19 14:49:19 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .headers ON sqlite> CREATE TABLE b (a integer); sqlite> INSERT INTO b VALUES (1); sqlite> SELECT * FROM b; a 1 sqlite> SELECT b.a FROM b; a 1 sqlite> SELECT c.a FROM b AS c; a 1 sqlite> SELECT c.a FROM (SELECT * FROM b) AS c; c.a 1 sqlite> SELECT c.a FROM b JOIN b AS c USING(a); a 1 sqlite> SELECT c.a FROM b JOIN (SELECT * FROM b) AS c USING(a); c.a 1 Note how if the column comes from a subselect, the subselect alias qualifier is included in the column header. I would expect a column header of a for all of these queries, and all other databases I've tested with use a column header of a. Is this a bug in SQLite? Jeremy _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users