SHOW LOGICAL TABLES
Description
The SHOW LOGICAL TABLES syntax is used to query logical tables in the specified database.
Syntax
ShowLogicalTables ::=
'SHOW' 'FULL'? 'LOGICAL' 'TABLES' ('FROM' databaseName)? showLike?
databaseName ::=
identifier
showLike ::=
'LIKE' likePattern
likePattern ::=
stringSupplement
- When
databaseNameis not specified, the default is the currently usedDATABASE; ifDATABASEis not used, it will promptNo database selected. FULLreturns the logical table type.- When the database contains schema metadata, the result also contains
schema_name.
Return Value Description
| Column | Description |
|---|---|
| table_name | Logical table name |
| table_type | Logical table type, returned only when FULL is specified |
| schema_name | Schema name, returned only when schema metadata exists |
Example
- Query logical tables from current database
SHOW LOGICAL TABLES;- Query full logical tables from specified database
SHOW FULL LOGICAL TABLES FROM sharding_db;- Query logical tables with like clause
SHOW LOGICAL TABLES LIKE 't_order%';Reserved word
SHOW, FULL, LOGICAL, TABLES, FROM, LIKE