This is what you want to do:
select * from (
select * from INFORMATION_SCHEMA.COLUMNS
where table_name = 'T1'
) dt
You cannot use SHOW COLUMNSin a subquery, but using a table INFORMATION_SCHEMA.COLUMNS, you have much more information, and not just the column name, for example.
source
share