The following query raises a "duplicate column name in derived table" error:
select table_name, * from information_schema.tables
But there is no derived table, and pretty much every database I know of allows for such a query. For example, PostgreSQL:
http://sqlfiddle.com/#!15/d41d8/1115
This query will produce the same error:
select table_name AS x, * from information_schema.tables
These queries, however, are a workaround for the problem:
select table_name, tables.* from information_schema.tables
select table_name, t.* from information_schema.tables t
Postgres is often wrong in its SQL Standard support.
You can use the unqualified asterisk in this way:
Otherwise you have to specify the table name.
You're right, my bad! I misinterpreted the standards document, which says:
Last edit: Lukas Eder 2014-02-07