Question

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.

Was it helpful?

Solution

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?

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top