質問

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:

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.

役に立ちましたか?

解決

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.

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?

他のヒント

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top