/    /  MySQL – List Table

MySQL – List Table

 

MySQL - List Table

When you manage MySQL database servers, getting familiar with the environment is one of the most frequent tasks you will perform. You can list the databases that reside on the server, display the database tables, or retrieve information regarding user accounts and their privileges.

Show MySQL Tables

The following command can be used to obtain a list of all the tables and views in the current database:

SHOW TABLES;

OUTPUT:

MySQL - List Table
If the FULL modifier is used, the table type will be displayed as a second output column.

SHOW FULL TABLES;

OUTPUT:

MySQL - List Table

When you want a list of the tables without having to switch to the database, use either the FROM or IN clause followed by the name of your database:

Syntax:

SHOW TABLES FROM database_name;

Example:

SHOW TABLES FROM employees;

MySQL - List Table