From 87d6ae422a0500255e71052f15a513dd54c333e8 Mon Sep 17 00:00:00 2001 From: "jiafeng.zhang" Date: Sat, 14 May 2022 19:11:12 +0800 Subject: [PATCH] [Doc]Add show tables help documentation Add show tables help documentation --- docs/.vuepress/sidebar/en.js | 1 + docs/.vuepress/sidebar/zh-CN.js | 1 + .../Show-Statements/SHOW-TABLES.md | 83 +++++++++++++++++++ .../Show-Statements/SHOW-TABLES.md | 83 +++++++++++++++++++ 4 files changed, 168 insertions(+) create mode 100644 docs/en/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md create mode 100644 docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js index ee1c9f532c2a3c..5ccf75082ac2d3 100644 --- a/docs/.vuepress/sidebar/en.js +++ b/docs/.vuepress/sidebar/en.js @@ -777,6 +777,7 @@ module.exports = [ "SHOW-STREAM-LOAD", "SHOW-SYNC-JOB", "SHOW-TABLE-ID", + "SHOW-TABLES", "SHOW-TABLE-STATUS", "SHOW-TABLET", "SHOW-TRANSACTION", diff --git a/docs/.vuepress/sidebar/zh-CN.js b/docs/.vuepress/sidebar/zh-CN.js index 899b5d94f853d2..330c25db57eaa1 100644 --- a/docs/.vuepress/sidebar/zh-CN.js +++ b/docs/.vuepress/sidebar/zh-CN.js @@ -777,6 +777,7 @@ module.exports = [ "SHOW-STREAM-LOAD", "SHOW-SYNC-JOB", "SHOW-TABLE-ID", + "SHOW-TABLES", "SHOW-TABLE-STATUS", "SHOW-TABLET", "SHOW-TRANSACTION", diff --git a/docs/en/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md b/docs/en/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md new file mode 100644 index 00000000000000..96cb124cd55c48 --- /dev/null +++ b/docs/en/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md @@ -0,0 +1,83 @@ +--- +{ + "title": "SHOW-TABLES", + "language": "en" +} +--- + + + +## SHOW-TABLES + +### Name + +SHOW TABLES + +### Description + +This statement is used to display all tables under the current db + +grammar: + +```sql +SHOW TABLES [LIKE] +```` + +illustrate: + +1. LIKE: Fuzzy query can be performed according to the table name + +### Example + + 1. View all tables under DB + + ```sql + 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) + ```` + +2. Fuzzy query by table name + + ```sql + mysql> show tables like '%cm%'; + +----------------+ + | Tables_in_demo | + +----------------+ + | cmy1 | + | cmy2 | + +----------------+ + 2 rows in set (0.00 sec) + ```` + +### Keywords + + SHOW, TABLES + +### Best Practice + diff --git a/docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md b/docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md new file mode 100644 index 00000000000000..59a98c855b4470 --- /dev/null +++ b/docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-TABLES.md @@ -0,0 +1,83 @@ +--- +{ + "title": "SHOW-TABLES", + "language": "zh-CN" +} +--- + + + +## SHOW-TABLES + +### Name + +SHOW TABLES + +### Description + +该语句用于展示当前 db 下所有的 table + +语法: + +```sql +SHOW TABLES [LIKE] +``` + +说明: + +1. LIKE:可按照表名进行模糊查询 + +### Example + + 1. 查看DB下所有表 + + ```sql + 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) + ``` + +2. 按照表名进行模糊查询 + + ```sql + mysql> show tables like '%cm%'; + +----------------+ + | Tables_in_demo | + +----------------+ + | cmy1 | + | cmy2 | + +----------------+ + 2 rows in set (0.00 sec) + ``` + +### Keywords + + SHOW, TABLES + +### Best Practice +