【发布时间】:2011-02-05 08:33:12
【问题描述】:
我在一张表上有一个两列的主键。我已尝试更改它以使用此命令将ignore_dup_key 设置为打开:
ALTER INDEX PK_mypk on MyTable
SET (IGNORE_DUP_KEY = ON);
但我收到此错误:
Cannot use index option ignore_dup_key to alter index 'PK_mypk' as it enforces a primary or unique constraint.
我还应该如何将IGNORE_DUP_KEY 设置为开启?
【问题讨论】:
标签: sql sql-server sql-server-2008 tsql database-design