sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Derived tables should require aliases

Open ssandler opened this issue 8 years ago • 0 comments

./bin/lint-query --query "SELECT * FROM table1 JOIN (select * from table2) ON some_column = some_other_column"

This passes the linter, but should fail because the subquery does not have an alias. Running this query in MySQL will return the error Every derived table must have its own alias.

ssandler avatar Oct 18 '17 19:10 ssandler