SHOW CREATE TABLE

Synopsis

  1. SHOW CREATE TABLE table_name

Description

Show the SQL statement that creates the specified table.

Examples

Show the SQL that can be run to create the orders table:

  1. SHOW CREATE TABLE sf1.orders;
  1. Create Table
  2. -----------------------------------------
  3. CREATE TABLE tpch.sf1.orders (
  4. orderkey bigint,
  5. orderstatus varchar,
  6. totalprice double,
  7. orderdate varchar
  8. )
  9. WITH (
  10. format = 'ORC',
  11. partitioned_by = ARRAY['orderdate']
  12. )
  13. (1 row)

See Also

create-table