Home >Database >Mysql Tutorial >How to get the list of tables in the default MySQL database?

How to get the list of tables in the default MySQL database?

WBOY
WBOYforward
2023-08-24 20:37:02788browse

How to get the list of tables in the default MySQL database?

As we all know, the default MySQL database will be the current database used for subsequent queries. We can use the SHOW TABLES statement to get the list of tables in this database.

mysql> SHOW TABLES;

+------------------+
| Tables_in_sample |
+------------------+
| employee         |
| new_student      |
| student          |
+------------------+

3 rows in set (0.00 sec)

The above statement shows a list of tables in the example database.

The above is the detailed content of How to get the list of tables in the default MySQL database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete