SHOW-TABLES
SHOW-TABLESβ
Nameβ
SHOW TABLES
Descriptionβ
This statement is used to display all tables under the current db
grammar:
SHOW [FULL] TABLES [LIKE]
illustrate:
- LIKE: Fuzzy query can be performed according to the table name
Exampleβ
View all tables under DB
mysql> show tables;
+---------------------------------+
| Tables_in_demo |
+---------------------------------+
| ads_client_biz_aggr_di_20220419 |
| cmy1 |
| cmy2 |
| intern_theme |
| left_table |
+---------------------------------+
5 rows in set (0.00 sec)Fuzzy query by table name
mysql> show tables like '%cm%';
+----------------+
| Tables_in_demo |
+----------------+
| cmy1 |
| cmy2 |
+----------------+
2 rows in set (0.00 sec)
Keywordsβ
SHOW, TABLES