Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the sql diagram of SHOW TABLES and SHOW INDEXES #2890

Merged
merged 2 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sql-statements/sql-statement-show-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ The statement `SHOW INDEXES [FROM|IN]` lists the indexes on a specified table.

## Synopsis

**ShowStmt:**
**ShowIndexStmt:**

![ShowStmt](/media/sqlgram/ShowStmt.png)

**ShowTargetFilterable:**

![ShowTargetFilterable](/media/sqlgram/ShowTargetFilterable.png)
![ShowIndexStmt](/media/sqlgram/ShowIndexStmt.png)

**ShowIndexKwd:**

Expand All @@ -31,6 +27,10 @@ The statement `SHOW INDEXES [FROM|IN]` lists the indexes on a specified table.

![TableName](/media/sqlgram/TableName.png)

**ShowLikeOrWhereOpt:**

![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png)

## Examples

```sql
Expand Down
58 changes: 33 additions & 25 deletions sql-statements/sql-statement-show-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ To show tables in a different database, use `SHOW TABLES IN DatabaseName`.

## Synopsis

**ShowStmt:**
**ShowTablesStmt:**

![ShowStmt](/media/sqlgram/ShowStmt.png)
![ShowTablesStmt](/media/sqlgram/ShowTablesStmt.png)

**ShowTargetFilterable:**
**OptFull:**

![ShowTargetFilterable](/media/sqlgram/ShowTargetFilterable.png)
![OptFull](/media/sqlgram/OptFull.png)

**ShowDatabaseNameOpt:**

![ShowDatabaseNameOpt](/media/sqlgram/ShowDatabaseNameOpt.png)

**ShowLikeOrWhereOpt:**

![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png)

## Examples

```sql
Expand Down Expand Up @@ -53,27 +57,31 @@ mysql> SHOW FULL TABLES;
2 rows in set (0.00 sec)

mysql> SHOW TABLES IN mysql;
+----------------------+
| Tables_in_mysql |
+----------------------+
| GLOBAL_VARIABLES |
| bind_info |
| columns_priv |
| db |
| default_roles |
| gc_delete_range |
| gc_delete_range_done |
| help_topic |
| role_edges |
| stats_buckets |
| stats_feedback |
| stats_histograms |
| stats_meta |
| tables_priv |
| tidb |
| user |
+----------------------+
16 rows in set (0.00 sec)
+-------------------------+
| Tables_in_mysql |
+-------------------------+
| GLOBAL_VARIABLES |
| bind_info |
| columns_priv |
| db |
| default_roles |
| expr_pushdown_blacklist |
| gc_delete_range |
| gc_delete_range_done |
| global_priv |
| help_topic |
| opt_rule_blacklist |
| role_edges |
| stats_buckets |
| stats_feedback |
| stats_histograms |
| stats_meta |
| stats_top_n |
| tables_priv |
| tidb |
| user |
+-------------------------+
20 rows in set (0.00 sec)
```

## MySQL compatibility
Expand Down