Purpose
You can use this statement to query information about database objects.
Syntax
SHOW {
| TABLE STATUS
| VARIABLES [like 'variable_name']
| CHARSET | CHARACTER SET
| COLLATION
| PARAMETERS
| TABLEGROUPS
| CREATE TABLEGROUP tablegroup_name
| CREATE TABLE table_name
| CREATE VIEW view_name
| ERRORS
| GRANTS
| PRIVILEGES
| RECYCLEBIN
| PROCESSLIST
};
Parameters
| Parameter | Description | |
|---|---|---|
| TABLE STATUS | The details about all tables of the current user. | |
| VARIABLES [like 'variable_name'] | The information about a variable. If like 'variable_name' is not specified, the information about all system variables is displayed. variable_name indicates the name of a variable. |
|
| CHARSET | CHARACTER SET | Queries supported character sets. |
| COLLATION | Queries supported collations. | |
| PARAMETERS | All system parameters. | |
| TABLEGROUPS | Queries table groups. | |
| CREATE TABLEGROUP tablegroup_name | Queries the CREATE TABLEGROUP statement. tablegroup_name indicates the name of the table group. |
|
| CREATE TABLE table_name | Queries the CREATE TABLE statement. table_name indicates the name of the table. |
|
| CREATE VIEW view_name | Queries the CREATE VIEW statement. view_name indicates the name of the view. |
|
| ERRORS | The errors. | |
| GRANTS | The privileges of the current user. | |
| PRIVILEGES | The description of privileges. | |
| RECYCLEBIN | View the recycle bin. | |
| PROCESSLIST | The process list. |
Examples
View the information about the creation of the
tbl1table.obclient> SHOW CREATE TABLE tbl1; +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | TABLE | CREATE TABLE | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | TBL1 | CREATE TABLE "TBL1" ( "COL1" NUMBER(38), "COL2" NUMBER(38) ) COMPRESS FOR ARCHIVE REPLICA_NUM = 2 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in setCheck whether the recycle bin is enabled.
obclient> SHOW VARIABLES LIKE 'recyclebin'; +---------------+-------+ | VARIABLE_NAME | VALUE | +---------------+-------+ | recyclebin | ON | +---------------+-------+ 1 row in setView the objects in the recycle bin.
obclient> SHOW RECYCLEBIN; +-----------------------------------+---------------+-------+------------------------------+ | OBJECT_NAME | ORIGINAL_NAME | TYPE | CREATETIME | +-----------------------------------+---------------+-------+------------------------------+ | RECYCLE_$_100004_1634807168766392 | TBL1 | TABLE | 21-OCT-21 05.06.08.767109 PM | | RECYCLE_$_100004_1634807177792816 | V1 | VIEW | 21-OCT-21 05.06.17.791967 PM | +-----------------------------------+---------------+-------+------------------------------+ 2 rows in set