CREATE UNLOGGED TABLE lineitem (
	L_ORDERKEY BIGINT NOT NULL,
	L_QUANTITY DECIMAL(15, 2) NOT NULL,
	L_SHIPDATE DATE NOT NULL,
   PARTIAL CLUSTER KEY  (l_shipdate, l_quantity)
)
WITH (
	'orientation' = column
)
DISTRIBUTE BY hash (L_ORDERKEY);
--------------------
CREATE UNLOGGED TABLE lineitem (
	L_ORDERKEY BIGINT NOT NULL,
	L_QUANTITY DECIMAL(15, 2) NOT NULL,
	L_SHIPDATE DATE NOT NULL,
   PARTIAL CLUSTER KEY  (l_shipdate, l_quantity)
)
WITH (
	'orientation' = column
)
DISTRIBUTE BY hash (L_ORDERKEY);
------------------------------------------------------------------------------------------------------------------------
CREATE GLOBAL TABLE test_global (
	L_ORDERKEY BIGINT NOT NULL
)
--------------------
CREATE GLOBAL TABLE test_global (
	L_ORDERKEY BIGINT NOT NULL
)
------------------------------------------------------------------------------------------------------------------------
CREATE LOCAL TABLE test_local (
	L_ORDERKEY BIGINT NOT NULL
)
--------------------
CREATE LOCAL TABLE test_local (
	L_ORDERKEY BIGINT NOT NULL
)
------------------------------------------------------------------------------------------------------------------------
CREATE TEMP TABLE test_temporary (
	L_ORDERKEY BIGINT NOT NULL
)
--------------------
CREATE TEMPORARY TABLE test_temporary (
	L_ORDERKEY BIGINT NOT NULL
)
------------------------------------------------------------------------------------------------------------------------
CREATE TEMPORARY TABLE test_temp (
	L_ORDERKEY BIGINT NOT NULL
)
--------------------
CREATE TEMPORARY TABLE test_temp (
	L_ORDERKEY BIGINT NOT NULL
)
------------------------------------------------------------------------------------------------------------------------
CREATE GLOBAL TEMPORARY TABLE test_global_temp (
	L_ORDERKEY BIGINT NOT NULL
)
--------------------
CREATE GLOBAL TEMPORARY TABLE test_global_temp (
	L_ORDERKEY BIGINT NOT NULL
)
------------------------------------------------------------------------------------------------------------------------
create table if not exists test_comment
(
business_date nvarchar2 comment '业务日期', -- 录音创建日期
big_area_name	nvarchar2 comment '门店大区'
)
comment 'TDA录音任务执行结果统计表'
--------------------
CREATE TABLE IF NOT EXISTS test_comment (
	business_date nvarchar2 COMMENT '业务日期',
	big_area_name nvarchar2 COMMENT '门店大区'
)
COMMENT 'TDA录音任务执行结果统计表'
------------------------------------------------------------------------------------------------------------------------
create table test_column_constraint
(
business_date nvarchar2 compress_mode DELTA, 
big_area_name nvarchar2 COLLATE utf8_bin,
col_constraint bigint not null,
col_constraint2 bigint null,
col_constraint3 bigint check (col_constraint3 > 0),
col_constraint4 bigint unique,
col_constraint5 bigint primary key，
constraint cst check(col_constraint4 > 0)
)
--------------------
CREATE TABLE test_column_constraint (
	business_date nvarchar2 COMPRESS_MODE DELTA,
	big_area_name nvarchar2 COLLATE utf8_bin,
	col_constraint bigint NOT NULL,
	col_constraint2 bigint NULL,
	col_constraint3 bigint
		CHECK (col_constraint3 > 0),
	col_constraint4 bigint UNIQUE,
	col_constraint5 bigint PRIMARY KEY,
	CONSTRAINT cst CHECK (col_constraint4 > 0)
)