gpt4 book ai didi

sql - 如何在 Hive 中为 View 添加列?

转载 作者:可可西里 更新时间:2023-11-01 16:46:35 25 4
gpt4 key购买 nike

我创建了包含两列 IDName 的 View myview。但我想为此添加额外的列。

我将查询用作:

ALTER VIEW myview ADD COLUMNS (AGE int);

但是我得到的错误是:

required (...)+ loop did not match anything at input 'columns' in add partition statement.

有什么帮助吗?

最佳答案

您必须从创建 View 的表中获取新列。

alter view myview as select col_1 ,col_2 ,Age from your_table

关于sql - 如何在 Hive 中为 View 添加列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36616389/

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