I have a Table with 4 Columns
Each Column will be A,B,C,D
Column A is the Primary key. Column B has unique name constraint.
Now I want to remove the
First of all you should drop an existing Constraint by using below ALTER Query.
ALTER TABLE table_name
DROP CONSTRAINT myUniqueConstraint;
Now, you can create a UNIQUE Constraint by using the keyword UNIQUE with the combination of required Columns.
For Example:
ALTER TABLE table_name
ADD CONSTRAINT myUniqueConstraint UNIQUE(B, C, D);
Detailed explanation of UNIQUE Constraint here.
Create a unique key on those columns
ALTER TABLE YourTable
add CONSTRAINT YourTable_unique UNIQUE (B, C, D);
Oracle/PLSQL: Unique Constraints
ALTER TABLE table_name DROP CONSTRAINT constraint_name;
CREATE UNIQUE INDEX constraint_name ON table_name (B,C,D)