You need to enable JavaScript to run this app.
ByteHouse Cloud Data Warehouse Version

ByteHouse Cloud Data Warehouse Version

Copy page
Download PDF
DDL
SHOW statements (SHOW)
Copy page
Download PDF
SHOW statements (SHOW)

SHOW DATABASES

Print all Database List. This Search is equivalent to SELECT name FROM system.databases.
Syntax

SHOW DATABASES

Example
Run Search:

SHOW DATABASES LIMIT 10;

Query results Example:
Image

SHOW TABLES

Display List of tables.
Syntax

SHOW TABLES [FROM [databaseIdentifier] [LIKE STRING_LITERAL]

If the FROM clause is not specified, the Search will Back the List of tables in the current Database.
Example
Run Search:

SHOW TABLES FROM doc_demo LIKE '%table';

Query results Example:
Image

SHOW CREATE TABLE

Display the create SQL of the table.
Syntax

SHOW CREATE [TABLE] [tableIdentifier]

Example

-- step 1: create table 
CREATE TABLE doc_demo.sale_table ( 
    id UInt32, 
    name String, 
    price UInt32 
) 
ENGINE = CnchMergeTree 
ORDER BY id; 

-- step 2: Search for create table statement 
SHOW CREATE TABLE doc_demo.sale_table;

Query results Example:
Image

SHOW DICTIONARIES

At List Form Display Dictionary.

SHOW DICTIONARIES [FROM <db>] [LIKE '<pattern>'] [LIMIT <N>] [INTO OUTFILE <filename>] [FORMAT <format>]

If the FROM clause is not specified, the List of Dictionary in the current Database will be Back.
You can get the same results as SHOW DICTIONARIES by the following Search:

SELECT name FROM system.dictionaries WHERE database = <db> [AND name LIKE <pattern>] [LIMIT <N>] [INTO OUTFILE <filename>] [FORMAT <format>]

Example
The following Search gets the first Feb Dictionary tables in the system Database whose Name contains reg ****.

SHOW DICTIONARIES FROM db LIKE '%reg%' LIMIT 2
┌─name─────────┐ 
│ regions      │ 
│ region_names │ 
└──────────────┘

SHOW PROCESSLIST

Output the Content of the system.processes table, containing the List of requests currently Processing. The SHOW PROCESSLIST Search is Not included. But the SELECT * FROM system.processes Search will Back all Data related to the current request.
Syntax

SHOW PROCESSLIST [WHERE expr]

parameter description:
The WHERE clause is optional and can be used to specify virtual warehouse, query statement, query ID, and others. Examples are as follows:

SHOW PROCESSLIST WHERE virtual_warehouse = '<vw_id>' 
SHOW PROCESSLIST WHERE virtual_warehouse = '<vw_id>' AND query LIKE '%<pattern>%' 
SHOW PROCESSLIST WHERE query_id = '<id>' 
SHOW PROCESSLIST WHERE query_id IN ('<id1>', '<id2>', ...)

SHOW GRANTS

Display the privilege of the User.
Syntax

SHOW GRANTS [FOR user]

If no User is specified, the privilege of the Current user is output.

SHOW CREATE USER

Display the Param for create User.
SHOW CREATE USER will No output the Password information of the User.
Syntax

SHOW CREATE USER [name | CURRENT_USER]

SHOW CREATE ROLE

Display the Param for Create Gamerole.
Syntax

SHOW CREATE ROLE name

SHOW CREATE ROW POLICY

Display the Param for create row Strategy.
Syntax

SHOW CREATE [ROW] POLICY name ON [database.]table
Last updated: 2026.03.31 10:31:07