Skip to content

Commit

Permalink
Update the sql diagram of SHOW TABLES and SHOW INDEXES (#2890)
Browse files Browse the repository at this point in the history
Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
  • Loading branch information
tangenta and yikeke authored Jun 16, 2020
1 parent 4c5d42c commit 66ddaaa
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
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

0 comments on commit 66ddaaa

Please sign in to comment.