473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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

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
2 4701
debasisdas
8,127 Expert 4TB
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
8,127 Expert 4TB
Please find details regarding Alter View .
Jul 23 '07 #3

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

Similar topics

3
by: M Simpson | last post by:
/* for the google index */ ALTER TABLE DEFAULT COLUMN DEFAULT VALUE I've worked out several stored procedures for altering the default column values in a table. They were compiled from books...
10
by: Jane | last post by:
Does any one know why this statement is failing? db2 => ALTER TABLE ELMT_T ALTER COLUMN CDTY_CD SET DATA TYPE VARCHAR(51) DB21034E The command was processed as an SQL statement because it was...
4
by: maricel | last post by:
Could someone confirm which tablespace is being used when running ALTER & CREATE INDEX. Is it the tempspace or the tablespace where the table resides? Many thanks, maricel
3
by: Klemens | last post by:
Hi, I get an implicit -101 on an alter table statement on changing the length of one column ALTER TABLE XTRADE.LIEFERANT ALTER COLUMN ZENTRALE_NUMMER SET DATA TYPE VARCHAR(13) DB21034E The...
3
by: Rajesh Kumar Mallah | last post by:
Hi, Looks like alter table does not tells about the indexes it dropped PG version: 7.4.3 Regds mallah.
7
by: Serge Rielau | last post by:
Hi all, Following Ian's passionate postings on problems with ALTOBJ and the alter table wizard in the control center I'll try to explain how to use ALTOBJ with this thread. I'm not going to get...
1
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
9
by: Siddu | last post by:
Hi All, I am new to this group and this is my first doubt i am facing at present. I am doing data migration. In this sequence i need to alter few views. Alter in the sense, inside the...
4
by: smanojgroup | last post by:
I have a view defined as select * on base table. When base table is altered to add new column, new column does not appear when selected from view. Here is what I did to test. db2 "create table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.