Show or list tables in a MySQL database

Posted February 22, 2005 by webgod in MySQL

Once you have selected a database, you can list the tables in it by using the show command.

To view all of the tables in the selected database, use:

To view all of the tables in a different database that isn't selected:

[code]SHOW TABLES IN other_database;

If you are looking for a specific table but don’t remember it’s exact name, you can use a wildcard with either of the above commands. For example, to find tables ending in “user” from the database “bigdb” use:

SHOW TABLES IN bigdb LIKE '%user';

The Conversation

Follow the reactions below and share your own thoughts.