This clause is not allowed if the column is specified in the primary key, or in a unique constraint of the table (SQLSTATE 42831).
如果表的主键或惟一性约束中指定了这个列,那么不允许使用这个子句(SQLSTATE 42831)。
Create a unique constraint to ensure no duplicate values are entered in specific columns that do not participate in a primary key.
创建唯一约束可确保在不参与主键的特定列中不输入重复值。
When you attach a unique constraint to a column allowing null values, you ensure that at most one row will have a null value in the constrained column.
当将唯一约束附加到允许空值的列时,请确保在约束的列中最多有一行包含空值。
Modify a unique constraint when you want to change the columns that the constraint is attached to, change the constraint name, or set additional properties for the constraint.
当想要更改约束所附加到的列、更改约束名称或设置约束的附加属性时,可修改唯一约束。
Delete a unique constraint when you want to remove the requirement for uniqueness for values entered in the column or combination of columns included in the constraint expression.
当希望移除对在约束表达式所包含的列或列组合中输入的值的唯一性要求时,可删除唯一约束。
Delete a unique constraint when you want to remove the requirement for uniqueness for values entered in the column or combination of columns included in the constraint expression.
当希望移除对在约束表达式所包含的列或列组合中输入的值的唯一性要求时,可删除唯一约束。
应用推荐