sql2005 删除index错误

gooood 2008-08-19 03:57:50
错误信息如下.那个表里面的constrain我也全部删除了,怎么还会这样

TITLE: Microsoft SQL Server Management Studio
------------------------------

Drop failed for Index 'dd'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Index&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

An explicit DROP INDEX is not allowed on index 'dbo.tdChildRiskFactor.dd'. It is being used for UNIQUE KEY constraint enforcement. (Microsoft SQL Server, Error: 3723)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=3723&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
...全文
134 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
klan 2008-08-20
  • 打赏
  • 举报
回复
就用alter table tdChildRiskFactor drop constraint dd了
wgzaaa 2008-08-19
  • 打赏
  • 举报
回复
表中仍有UNIQUE索引'dbo.tdChildRiskFactor.dd',需要用alter table 删除
alter table tdChildRiskFactor drop constraint dd
想飞的狼 2008-08-19
  • 打赏
  • 举报
回复
表里是不是主键不唯一
M1CR0S0FT 2008-08-19
  • 打赏
  • 举报
回复
http://topic.csdn.net/t/20030401/10/1602475.html

34,594

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧