GBase 8a
其他
文章
clickhouse 建表create table 报错Expected one of: storage definition, ENGINE, AS
GBase社区管理员发表于2021-04-27 13:06:4023次浏览0个评论
clickhouse在建表create table时,必须指定引擎类型,否则就会报Expected one of: storage definition, ENGINE, AS错误。
报错样例
localhost :) create table t1(id int, name varchar(100),birthday date);
Syntax error: failed at position 57 (end of query):
create table t1(id int, name varchar(100),birthday date);
Expected one of: storage definition, ENGINE, AS
解决方案
增加引擎指定,并且按照引擎要求提供必要的参数。
localhost :) create table t1(id int, name varchar(100),birthday date)ENGINE = MergeTree() primary key id;
CREATE TABLE t1
(
`id` int,
`name` varchar(100),
`birthday` date
)
ENGINE = MergeTree
PRIMARY KEY id
Query id: 5f8f94dc-3db7-429c-b954-32538c859095
Ok.
0 rows in set. Elapsed: 0.057 sec.
localhost :)
评论已关闭
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526