Skip to content
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 @@ -6,27 +6,20 @@ aliases: ['/docs/dev/sql-statements/sql-statement-show-tables/','/docs/dev/refer

# 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 @@ -92,3 +85,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)