SHOW-TABLES

Name

SHOW TABLES

Description

该语句用于展示当前 db 下所有的 table

语法:

1. SHOW TABLES [LIKE]

说明:

  1. LIKE:可按照表名进行模糊查询

Example

  1. 查看DB下所有表

1. mysql> show tables; 2. +---------------------------------+ 3. | Tables_in_demo | 4. +---------------------------------+ 5. | ads_client_biz_aggr_di_20220419 | 6. | cmy1 | 7. | cmy2 | 8. | intern_theme | 9. | left_table | 10. +---------------------------------+ 11. 5 rows in set (0.00 sec) 2. 按照表名进行模糊查询

1. mysql> show tables like '%cm%'; 2. +----------------+ 3. | Tables_in_demo | 4. +----------------+ 5. | cmy1 | 6. | cmy2 | 7. +----------------+ 8. 2 rows in set (0.00 sec)

Keywords

1. SHOW, TABLES

Best Practice