Bootstrap FreeKB - mySQL / MariaDB - List the tables in a database using the show tables command
mySQL / MariaDB - List the tables in a database using the show tables command

Updated:   |  mySQL / MariaDB articles

The show tables command can be used to list the tables in a database. You will first need to log into your MariaDB or mySQL server or configure passwordless authentication and then use the -e command line option.

One option is to first use the use <database name> command and then issue the show tables command. In this example, the database named db001 will be used. 

use db001; show tables;

 

Something like this should be returned.

+------------------+
| Tables_in_db001  |
+------------------+
| table001         |
| table002         |
| table003         |
+------------------+

 

Or, the "use <database name>" command can often be ignored by including the database name in the show tables command.

show db001.tables;

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 92ea13 in the box below so that we can be sure you are a human.