UNIQUE CONSTRAINT允許其中的欄位有空值,但是欄位的組合仍必須為唯一
英文說明
WHAT IS THE DIFFERENCE BETWEEN A UNIQUE CONSTRAINT AND A PRIMARY KEY?
Primary Key | Unique Constraint |
---|---|
None of the fields that are part of the primary key can contain a null value. | Some of the fields that are part of the unique constraint can contain null values as long as the combination of values is unique. |
Oracle does not permit you to create both a primary key and unique constraint with the same columns.
沒有留言:
張貼留言