Reputation: 1420
I have three databases in mysql
. And I would like to list all the tables in each database. How can I achieve this?
Upvotes: 0
Views: 129
Reputation: 12036
select table_schema as database_name, table_name
from information_schema.tables
where table_type = 'BASE TABLE'
and table_schema not in ('information_schema','mysql',
'performance_schema','sys')
order by database_name, table_name;
Upvotes: 2