使用SMO如何删除主键?
如题:
当一个主键存在时,我使用了Index.Drop();
结果报错如下:
An explicit DROP INDEX is not allowed on index 'dbo.Article.PK_Article '. It is being used for PRIMARY KEY constraint enforcement.
十分感谢!
------解决方案--------------------不知道,路过,帮顶!
------解决方案--------------------alter table [tablename]
nocheck constraint all
alter table [tablename]
check constraint all
------解决方案--------------------UP!