ygrek / sqlgg

SQL Guided (code) Generator
https://ygrek.org/p/sqlgg/
GNU General Public License v2.0
62 stars 20 forks source link

detect ambiguous columns #93

Closed cyberhuman closed 3 weeks ago

cyberhuman commented 4 years ago

This is accepted by sqlgg:

create table foo ( id integer primary key );
create table bar ( id integer primary key );
select * from foo join bar on foo.id = bar.id order by id;

but fails in run time (mysql) with:

ERROR 1052 (23000): Column 'id' in order clause is ambiguous
jongleb commented 3 weeks ago

https://github.com/ygrek/sqlgg/pull/21