在 Oracle Designer 中向视图添加列

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20401953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:07:14  来源:igfitidea点击:

add column to a view in Oracle Designer

oracleviewsql-view

提问by user2932466

I have a view in Oracle designer which I'd like to add a column to. I've tried Create columnand input within the Fre Format tab the following statement:

我在 Oracle 设计器中有一个视图,我想向其中添加一列。我已经尝试Create column在 Fre Format 选项卡中输入以下语句:

ALTER VIEW View_name_vw
ADD (new_column VARCHAR(100));

but it's not updating. Is there something I need to include after this step? Any help appreciated.

但它没有更新。在这一步之后我需要包括什么吗?任何帮助表示赞赏。

回答by Armunin

A View is basically only a SELECT-statement. If you want to add another column to your view, just change the statement on which it is based. If you need a whole new column with new data, change the underlying table structure from which you are selecting the columns that are shown in your view.

视图基本上只是一个 -SELECT语句。如果您想在视图中添加另一列,只需更改它所基于的语句。如果您需要一个包含新数据的全新列,请更改基础表结构,从中选择视图中显示的列。

For more information check the official Oracle documentation:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm
Or see this question on SO:
What is a View in Oracle?

有关更多信息,请查看 Oracle 官方文档:
http: //docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm
或者在 SO 上查看这个问题:
What is a View in Oracle?

回答by Saurabh Kanoongo

A View can't be altered.Option is to change in the defination of the view or change in table is the only option.

视图不能被改变。选项是改变视图的定义或改变表是唯一的选择。