CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name -- (Note: TEMPORARY available in Hive 0.14.0 and later) [(col_name data_type [COMMENT col_comment], ... [constraint_specification])] [COMMENT table_comment] [PARTITIONED BY (col_name data_type [COMMENT col_com...
NOTE: A primary key (PK) is a constraint. Each set of values in its columns can only appear once. So you can't have duplicates. It also has a not null constraint. And creates a unique index in the background.To create one, add the organization index clause to the table definition...
After you create a partitioned table, consider setting the LOCK_ESCALATION option for the table to AUTO. This can improve concurrency by enabling locks to escalate to partition (HoBT) level instead of the table. For more information, seeALTER TABLE (Transact-SQL). TEXTIMAGE_ON { filegroup|"de...
<table_constraint> ::= [ CONSTRAINT constraint_name ] { { PRIMARY KEY | UNIQUE } [ CLUSTERED | NONCLUSTERED ] ( column_name [ ASC | DESC ] [ ,... n ] ) [ WITH FILLFACTOR = fillfactor | WITH ( <index_option> [ ,... n ] ) ] [ ON { partition_scheme_name (partition_column...
<table_constraint> ::= [ CONSTRAINT constraint_name ] { { PRIMARY KEY | UNIQUE } [ CLUSTERED | NONCLUSTERED ] ( column_name [ ASC | DESC ] [ ,... n ] ) [ WITH FILLFACTOR = fillfactor | WITH ( <index_option> [ ,... n ] ) ] [ ON { partitio...
CREATE TABLE [ IF NOT EXISTS ] partition_table_name ( [ { column_name data_type [ COLLATE collation ] [ column_constraint [ ... ] ] | table_constraint | LIKE source_table [ like_option [...] ] }[, ... ] ] ) [ WITH ( {storage_parameter = value} [, ... ] ) ] [ COMPR...
要创建已创建的临时表,请使用 CREATE GLOBAL TEMPORARY TABLE 语句。 要声明已声明的临时表,请使用 DECLARE GLOBAL TEMPORARY TABLE 语句。 调用 此语句可以嵌入在应用程序中,也可通过动态 SQL 语句来发出。 它是一个可执行语句,仅当 DYNAMICRULES 运行行为对于程序包有效时才能动态编译 (SQLSTATE 42509)。
如需詳細資訊,請參閱<SET QUOTED_IDENTIFIER (Transact-SQL)>。 FILESTREAM_ON { partition_scheme_name | filegroup | "default" } 為FILESTREAM 資料指定檔案群組。 如果此資料表包含 FILESTREAM 資料,而且資料表已分割,則必須包含 FILESTREAM_ON 子句,而且必須指定 FILESTREAM 檔案群組的資料分割配置。這個資料分割...
table_constraint 重要 此功能目前以公共预览版提供。 向流式处理表添加信息性主键或信息性外键约束。 hive_metastore 目录中的表不支持键约束。 table_clauses 为新表指定分区、注释、用户定义的属性和刷新计划(可选)。每个子子句只能指定一次。 PARTITIONED BY 表中用于对表进行分区的列可选列表。 COMMEN...
<table_constraint> ::= [ CONSTRAINT constraint_name ] { { PRIMARY KEY | UNIQUE } [ CLUSTERED | NONCLUSTERED ] ( column_name [ ASC | DESC ] [ ,... n ] ) [ WITH FILLFACTOR = fillfactor | WITH ( <index_option> [ ,... n ] ) ] [ ON { partition_scheme_name (partition_column...