更新时间:2024-12-13 GMT+08:00
分享

SHOW CREATE TABLE

语法

SHOW CREATE TABLE table_name

描述

显示指定数据表的SQL创建语句。

示例

显示能够创建orders表的SQL 语句:

CREATE TABLE orders ( 
 orderkey bigint, 
 orderstatus varchar, 
 totalprice double, 
 orderdate date 
 ) 
 WITH (format = 'ORC', location='obs://bucket/user',orc_compress='ZLIB',external=true, "auto.purge"=false);

show create table orders;
     
                  Create Table                   
-------------------------------------------------
 CREATE TABLE hive.default.orders (              
    orderkey bigint,                             
    orderstatus varchar,                         
    totalprice double,                           
    orderdate date                               
 )                                               
 WITH (                                          
    external_location = 'obs://bucket/user', 
    format = 'ORC',                              
    orc_compress = 'ZLIB',                       
    orc_compress_size = 262144,                  
    orc_row_index_stride = 10000,                
    orc_stripe_size = 67108864                   
 )                                               
(1 row)

相关文档