Yongil Jang wrote:
> 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.

You get an error only if the duplicate actually matters.  (Changing this
now would not be backwards compatible.)

In this case, it's just the text of the error message that is wrong.
If you were using any other column than the rowid, the error message
would be "ambiguous column name".

BTW, the rowid lookup has another bug: it does not find the rowid if
the name might match multiple tables, even if there is only one table
that actually has a rowid:

sqlite> create table a(x primary key) without rowid;
sqlite> create table b(y);
sqlite> select rowid from a, b;
Error: no such column: rowid


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to