I want to show index
from each table that has table_schema='foo'
(database name).
mysql> show index from table_name from information_schema.tables where table_schema='foo';
ERROR 1109 (42S02): Unknown table 'table_name' in information_schema
From the error, I see that the query treats 'table_name'
as a table in information_schema
. How do I rewrite the query to treat 'table_name'
as a column in information_schema.tables
?