Skip to content

Commit

Permalink
ebnf show indexes (#17085)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored Apr 22, 2024
1 parent a7e698b commit 2ef4224
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions sql-statements/sql-statement-show-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,14 @@ The statement `SHOW INDEXES [FROM|IN]` lists the indexes on a specified table. T

## Synopsis

**ShowIndexStmt:**
```ebnf+diagram
ShowIndexStmt ::=
"SHOW" ( "INDEX" | "INDEXES" | "KEYS" ) ("FROM" | "IN" ) TableName (("FROM" | "IN") SchemaName )? ShowLikeOrWhereOpt?
![ShowIndexStmt](/media/sqlgram/ShowIndexStmt.png)

**ShowIndexKwd:**

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

**FromOrIn:**

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

**TableName:**

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

**ShowLikeOrWhereOpt:**

![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png)
ShowLikeOrWhere ::=
"LIKE" SimpleExpr
| "WHERE" Expression
```

## Examples

Expand Down Expand Up @@ -73,3 +62,7 @@ The `SHOW INDEXES [FROM|IN]` statement in TiDB is fully compatible with MySQL. I
* [SHOW CREATE TABLE](/sql-statements/sql-statement-show-create-table.md)
* [DROP INDEX](/sql-statements/sql-statement-drop-index.md)
* [CREATE INDEX](/sql-statements/sql-statement-create-index.md)
* [`information_schema.TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md)
* [`information_schema.TIDB_INDEX_USAGE`](/information-schema/information-schema-tidb-index-usage.md)
* [`information_schema.KEY_COLUMN_USAGE`](/information-schema/information-schema-key-column-usage.md)
* [`sys.schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md)

0 comments on commit 2ef4224

Please sign in to comment.