Hi,

I think I've found something interesting result of SQLite when I used
incorrect (duplicated) alias name with two tables.
As you can see below example, duplicated alias name of two tables that
don't have same column doesn't return error for normal case.
However, if I add "rowid" to example query, I get "no such column: [alias
name].rowid" error.

D:\>sqlite3
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create temp table a (id integer);
sqlite> create temp table b (di integer);
sqlite> select * from a as aname, b as aname;
sqlite> select * from a as aname, b as aname where aname.id = aname.di;
sqlite> select **, aname.rowid* from a as aname, b as aname where aname.id
= aname.di;
*Error: no such column: aname.rowid*

I think duplicated alias name should be restricted from syntax parsing.

Thank you.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to