show all tables with mysql commandline interface

Running the non-SQL command “SHOW TABLES” at the “mysql” prompt will allow us to all the tables in a database.

 
>cd \mysql\bin
>mysql -u root test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 5.0.24
 
mysql> SHOW TABLES;
+----------------+
| Tables_in_w3mdb|
+----------------+
| links                 |
+----------------+
 
1 row in set (0.01 sec)

The output shows you that there is only one table in the “w3mdb” database.

Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

 

 
eXTReMe Tracker