gpt4 book ai didi

How to add column to nested column(如何将列添加到嵌套列)

转载 作者:bug小助手 更新时间:2023-10-25 19:46:10 32 4
gpt4 key购买 nike



I have a table with nested column

我有一个包含嵌套列的表


...
a UInt64
b Nested (b1 String, b2 String)
c LowCardinality(String),
...

I want to update the table to be

我想要将表格更新为


...
a UInt64
b Nested (b1 String, b2 String, **b3 String**)
c LowCardinality(String),
...

I tried:

我试过:


ALTER TABLE table_name ADD COLUMN IF NOT EXISTS b3 String AFTER b2

ALTER TABLE TABLE_NAME如果b2后不存在b3字符串,则添加列


but I need the new column to be a part of Nested b

但是我需要新列成为嵌套的b的一部分。


更多回答
优秀答案推荐

found an answer

找到了答案


ALTER TABLE table_name ADD COLUMN IF NOT EXISTS b3 Array(LowCardinality(String)) AFTER b2

(In my case it urls.success. *urls is the nested)

(在我的例子中,它是成功的。*URL是嵌套的)


更多回答

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com