Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-00955 error when dropping field
Karsten Farrell wrote:
> Chris Austin wrote:
> > Hello:
> >
> > I am trying to move data from a varchar to a clob. I add a new field
> > to the table called TempX and update it with the data from the
> > original varchar. When I try to remove the original field I get an
> > ORA-00955 error. Here is my SQL
> >
> > alter table RenewalText drop column NewText;
> >
> > and this is the error:
> >
> > ERROR at line 1:
> > ORA-00955: name is already used by an existing object
> >
> > What could be causing this?
> >
> > Thanks
> You can only drop columns from the "end" of a table (the last column
> when you DESCRIBE the table). When you added your new column, the
> original column was no longer last.
>
> As a workaround, you could create a working table with the key columns
> from your original table and your CLOB column. Then load that table.
> Then drop the original column from your original table. Then add the
> CLOB column to your original table. Then populate it from your working
> table. Then drop your working table. Phew!
Excuse me ... but ...
SQL> create table xyz (
2 firstfld varchar2(2), 3 secondfld varchar2(2), 4 lastfld varchar2(2));
Table created.
SQL> alter table xyz
2 drop column secondfld;
Table altered.
SQL> You can drop any column you want in 8.1.7. and above.
Daniel Morgan Received on Thu Oct 24 2002 - 14:44:04 CDT
![]() |
![]() |