List tables from all databases in MySQL

Article for: SQL Server Teradata MariaDB

The query below lists all tables in all user databases. To list tables just from current database use this query.


select table_schema as database_name,
from information_schema.tables
where table_type = 'BASE TABLE'
    and table_schema not in ('information_schema','mysql',
order by database_name, table_name;


  • table_schema - database (schema) name
  • table_name - table name


  • One row: represents one table in a database (schema)
  • Scope of rows: all tables in all databases (schemas)
  • Ordered by: table name

Sample results

You could also get this

Get this interactive HTML data dictionary in minutes with Dataedo.

See live HTML data dictionary sample

Try for free

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.