How to give a unique constraint to a combination of columns in Oracle?

前端 未结 3 2104
谎友^
谎友^ 2020-12-15 03:26

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

3条回答
  •  难免孤独
    2020-12-15 03:48

    Create a unique key on those columns

    ALTER TABLE YourTable
      add CONSTRAINT YourTable_unique UNIQUE (B, C, D);
    

    Oracle/PLSQL: Unique Constraints

提交回复
热议问题