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

ebnf show tables (#17068) #17187

Merged
Merged
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
24 changes: 9 additions & 15 deletions sql-statements/sql-statement-show-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,20 @@ summary: An overview of the usage of SHOW [FULL] TABLES for the TiDB database.

# SHOW [FULL] TABLES

This statement shows a list of tables and views in the currently selected database. The optional keyword `FULL` indicates if a table is of type `BASE TABLE` or `VIEW`.
This statement shows a list of tables and views in the currently selected database. The optional keyword `FULL` indicates if a table is of type `BASE TABLE`, `SEQUENCE`, or `VIEW`.

To show tables in a different database, use `SHOW TABLES IN DatabaseName`.

## Synopsis

**ShowTablesStmt:**
```ebnf+diagram
ShowTableStmt ::=
"SHOW" "FULL"? "TABLES" ("FROM" Identifier | "IN" Identifier )? ShowLikeOrWhere?

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

**OptFull:**

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

**ShowDatabaseNameOpt:**

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

**ShowLikeOrWhereOpt:**

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

## Examples

Expand Down Expand Up @@ -91,3 +84,4 @@ The `SHOW [FULL] TABLES` statement in TiDB is fully compatible with MySQL. If yo
* [CREATE TABLE](/sql-statements/sql-statement-create-table.md)
* [DROP TABLE](/sql-statements/sql-statement-drop-table.md)
* [SHOW CREATE TABLE](/sql-statements/sql-statement-show-create-table.md)
* [`INFORMATION_SCHEMA.TABLES`](/information-schema/information-schema-tables.md)
Loading