By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,505 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,505 IT Pros & Developers. It's quick & easy.

Alter View.............

P: 38
Hi,
Can any one please help me in this matter.

I have created a table :-

create table Employee
(
id number,
name varchar2(10),
city varchar2(10)
);


After that i created view for Employee table :-

create view viewEmployee
as
select * from Employee where id=101;


After that i tried to drop column(city) of table(Employee) through view(viewEmployee).

alter view viewEmployee drop column city
*
ERROR at line 1:
ORA-00905: missing keyword

But in net I saw that a view cannot be altered if we want to alter view means we need to drop the existing view and create view according to our requirements.

But when i was studying Data Dictionary i came across that if we make any changes to view it will affect base tables, then according to that definition in Data Dictionary I should be able to drop column(city) of table(Employee) through view(viewEmployee).


******** Anyone please help me to drop column(city) of table Employee through
view(viewEmployee)**********.


Regards,
Naveen
Jul 23 '07 #1
Share this Question
Share on Google+
2 Replies


debasisdas
Expert 5K+
P: 8,127
Hi,
But in net I saw that a view cannot be altered if we want to alter view means we need to drop the existing view and create view according to our requirements.

But when i was studying Data Dictionary i came across that if we make any changes to view it will affect base tables, then according to that definition in Data Dictionary I should be able to drop column(city) of table(Employee) through view(viewEmployee).
I dont know from where you got all that idea that a view can't be altered.

again what u have read regarding Data Dictionary is correct ........but what u have understood is wrong.

It says regarding data not structure.
Jul 23 '07 #2

debasisdas
Expert 5K+
P: 8,127
Please find details regarding Alter View .
Jul 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.