SHOW-TABLES
Name
SHOW TABLES
Description
This statement is used to display all tables under the current db
Syntax:
SHOW TABLES [LIKE]
Note:
- LIKE: to perform fuzzy query based on table names
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