Constraint Primary key problem
525573Jul 28 2006 — edited Jul 28 2006First off, I'm incredibly new to Oracle and fairly new to SQL in general.
The table I'm dealing with was created using:
create table TGInstManualEng (
ProjectID varchar2(10) not null,
Indent varchar2(1) not null,
Item varchar2(255),
constraint TGInstManualEng_pk primary key (ProjectID,Indent)
);
Now I need to change the constraint to
constraint TGInstManualEng_pk primary key (ProjectID, Item)
I read up on the net a bit and figured out that modify constraints is apparently not possible, so I first dropped the constraint planning to add the new updated one afterwards.
I dropped the constraint using
ALTER TABLE TGInstManualEng
DROP CONSTRAINT TGINSTMANUALENG_PK;
which seemed to work just fine. Problem is, SQL still seems to think that the name TGInstManualEng_pk is still taken, When I try to add a new Constraint, I get:
SQL> ALTER TABLE TGInstManualEng
2 ADD CONSTRAINT TGInstManualEng_pk primary key (ProjectID, Item);
ALTER TABLE TGInstManualEng
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
Is there something I need to do to validate the dropped cosntraint?