Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm trying to rename a constraint (

Status
Not open for further replies.

ofsouto

Programmer
Apr 29, 2000
185
BR
I'm trying to rename a constraint (primary key) and a message shows up: ORA-14155 missing PARTITION or SUBPARTITION keyword. What can I do to rename constraints (primary and foreign keys)?

ALTER TABLE table_1 RENAME CONSTRAINT constraint_old_name TO constraint_new_name;

Oracle 8i (8.1.7 Release).

Thanks in advance.
 
I dont think you can rename constraints.You will have to drop it and create a new one.

Thanks
Rohan
 
If your tables currently have data then you can't drop them but you can modify.

Try this: ALTER TABLE (TABLE1 MODIFY(COLUMN DATATYPE CONSTRAINT CONSTRAINT_NAME));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top