You can use the SHOW TABLES
statement to list all tables in the currently selected MySQL database. For example:
SHOW TABLES;
It will produce an output like the following:
+-------------------+
| Tables_in_db_name |
+-------------------+
| user |
| orders |
+-------------------+
The name of the column in the output produced by the SHOW TABLES
statement is always Tables_in_db_name
, where db_name
is the name of the database.
This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.