开发者

Modify unique constraint in Oracle

开发者 https://www.devze.com 2022-12-11 14:52 出处:网络
I need to update an existing constraint in Oracle database to add a new column there. ALTER TABLE MY_PARTNER_DETAILS

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 t开发者_高级运维he problem with that?


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

See: Oracle Docs

0

精彩评论

暂无评论...
验证码 换一张
取 消