Get a list of tables via the MySQL command line

Question
How do I get a list of tables from the MySQL command line?

Answer

First: Switch to desired database

mysql> use dborc3_sqli
Database changed

Next: Get list of tables

mysql> show tables;
+-----------------------+
| Tables_in_dborc3_sqli |
+-----------------------+
| contributor           |
| courses               |
| customers             |
| ensfields             |
| ensfiles              |
| heuristic             |
| mainmnuitem           |
| pagecontrib           |
| pgcontent             |
| pgcontenthdr          |
| pmainmnu              |
| sitearea              |
| siteareamnmnu         |
| siteareasubmnu        |
| sitecontentlicense    |
| siteproperties        |
| submnu                |
| submnulst             |
| test                  |
+-----------------------+
19 rows in set (0.00 sec)

mysql> 

 Collapse All    Expand All
Custom Search

MySQL Information and Resources