MySQL SHOW TABLES Statement

MySQL | SHOW TABLES: Learn about the MySQL SHOW TABLES Statement, with its explanation, syntax, and query examples.
Submitted by Apurva Mathur, on September 04, 2022

SHOW TABLES Statement

We have many databases, and one database may have many tables, MySQL SHOW TABLES statement helps us to see all the existing tables presented in a database.

Syntax:

SHOW TABLES from database_name;

SHOW TABLES Statement in MySQL Command-Line Client

In the command-line client to see all the tables of a database following steps should be performed.

Step 1: Foremost step is to select the database, (Here my database name is "new_schooldb").

SHOW TABLES Statement (Step 1)

Step 2: Now, we'll see how many tables this database contains by writing the following query,

SHOW TABLES FROM new_schoodb;
SHOW TABLES Statement (Step 2)

Once you will hit this query, you will see all the tables which are there in your database.

SHOW TABLES Statement in MySQL Workbench

Now let us see how we will see our tables in MySQL workbench.

To see all the tables a particular database has, you simply have to click on the particular schemas drop down and inside that, you'll see all your tables, as shown in the picture,

SHOW TABLES Statement (Step 3)



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.