SHOW-TABLES
Name
SHOW TABLES
Description
该语句用于展示当前 db 下所有的 table
语法:
SHOW TABLES [LIKE]
说明:
- LIKE:可按照表名进行模糊查询
Example
查看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)
按照表名进行模糊查询
mysql> show tables like '%cm%';
+----------------+
| Tables_in_demo |
+----------------+
| cmy1 |
| cmy2 |
+----------------+
2 rows in set (0.00 sec)
Keywords
SHOW, TABLES