Skip to main content
Last updated on

SHOW CREATE STREAM

Description

Shows the CREATE statement of a Table Stream, including its base table, comment, and properties.

Syntax

SHOW CREATE STREAM [<db_name>.]<stream_name>

Required Parameters

1. <stream_name>

The Stream name.

Optional Parameters

1. <db_name>

The database of the Stream; defaults to the current database.

Return Value

ColumnDescription
StreamStream name
Create StreamThe CREATE statement

Access Control Requirements

The user executing this SQL command must have at least the following privileges:

PrivilegeObjectNotes
SHOW_PRIVStream

Usage Notes

Running this statement on an ordinary table fails with a hint to use SHOW CREATE TABLE. If the base table has been dropped, ON TABLE shows UNKNOWN.

Examples

SHOW CREATE STREAM orders_stream\G
*************************** 1. row ***************************
Stream: orders_stream
Create Stream: CREATE STREAM `orders_stream`
ON TABLE internal.demo.orders
COMMENT 'sync order changes to dwd'
PROPERTIES (
"type" = "MIN_DELTA",
"show_initial_rows" = "false"
);