Hi List,

Given a table created as:   create table aaa(a);

Sqlite reports an error "ambiguous column name: main.aaa.a" for the following 

select * from aaa, aaa;
Error: ambiguous column name: main.aaa.a

And also for similar queries

select * from aaa INNER JOIN aaa;
select * from aaa CROSS JOIN aaa;

select * from aaa JOIN aaa;

Tested with sqlite version 3.21.0 and an old version

I think the query is valid and should not result in an error. Typically Sqlite 
would name the resulting columns "a" and "a:1" in this case.

Workaround: add an alias for one of the tables in the join (both columns will 
be called "a").

Met Vriendelijke Groet, Kind Regards, 谨致问候,

Rob Golsteijn
sqlite-users mailing list

Reply via email to