shuttle1978
shuttle1978

Reputation: 123

Oracle drop constraint unique and re-add it

I've drop a constraint unique key with command:

ALTER TABLE table
    DROP CONSTRAINT UNIQUE uk_nome;

it's removed because I don't see it, but when I try to re-add it with different parameter:

ALTER TABLE tale ADD CONSTRAINT UK_name UNIQUE (uk_1, uk_2);

I receive the error:

Errore SQL: ORA-00955: name is already used by an existing object.

Where is the problem?

Upvotes: 0

Views: 466

Answers (2)

shuttle1978
shuttle1978

Reputation: 123

Resolved, the unique key is present, like index, into the system in the table dba_objects

Upvotes: 1

user2656151
user2656151

Reputation:

You drop uk_nome and then add uk_name. I mean that there is a typo in uk_nome.

Upvotes: 2

Related Questions