Home >Database >Mysql Tutorial >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!