Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modify unique constraint in Oracle

I need to update an existing constraint in Oracle database to add a new column there.

ALTER TABLE MY_PARTNER_DETAILS 
MODIFY CONSTRAINT UQ_MY_PARTNER_DETAILS
UNIQUE(PARTNER_CODE,PGOOD_CODE,SITE_CODE,PARTNER_PLACEMENT,PARTNER_PARTICIPATION)

Gives the error:

Error at line 1
ORA-00933: SQL command not properly ended

What's the problem with that?

like image 895
wheleph Avatar asked Nov 13 '09 19:11

wheleph


1 Answers

You should drop and recreate the constraint. modify constraint allows you to change constraint's state not definition.

See: Oracle Docs

like image 174
Majkel Avatar answered Nov 11 '22 07:11

Majkel