Doris建表

Name: ‘CREATE TABLE’ Description:

该语句用于创建 table。 语法:

CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [database.]table_name
(column_definition1[, column_definition2, …]
[, index_definition1[, ndex_definition12,]])
[ENGINE = [olap|mysql|broker|hive]]
[key_desc]
[COMMENT “table comment”];
[partition_desc]
[distribution_desc]
[rollup_index]
[PROPERTIES (“key”=“value”, …)]
[BROKER PROPERTIES (“key”=“value”, …)]
column_definition 语法: col_name col_type [agg_type] [NULL | NOT NULL] [DEFAULT “default_value”]

说明: col_name:列名称 col_type:列类型

TINYINT(1字节)
范围:-2^7 + 1 ~ 2^7 - 1
SMALLINT(2字节)
范围:-2^15 + 1 ~ 2^15 - 1
INT(4字节)
范围:-2^31 + 1 ~ 2^31 - 1
BIGINT(8字节)
范围:-2^63 + 1 ~ 2^63 - 1
LARGEINT(16字节)

你可能感兴趣的:(hadoop,大数据)