SHOW CREATE TABLE
Show the definition that creates the specified Arctic table. The output includes two columns:
path
: The path to the specified table.
sql_definition
: The definition for the specified table.
note
You need the SELECT
privilege on the table to retrieve the definition.
SHOW CREATE TABLE <table_name>
[ AT { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> ]
Parameters
<table_name> String
The name of the table whose definition you want to see.
AT { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> String Optional
Specify the reference for which you want to show the table definition:
REF
: Identifies the branch, tag, or commit for the table for which you want to show the available definition.BRANCH
: Identifies the branch for the table for which you want to show the available definition.TAG
: Identifies the tag for the table for which you want to show the available definition.COMMIT
: Identifies the commit for the table for which you want to show the available definition. Commit hashes must be enclosed in double quotes (for example,“ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”
).
Examples
Show the definition of an Arctic table in a specified branchSHOW CREATE TABLE "company_data".employees
AT BRANCH "main"