删除在建表时SQL SERVER2000指定PRIMARY KEY引起的 聚合索引

declare   @s   nvarchar(4000)  
  select   @s='alter   table   '+quotename(object_name(parent_obj))  
  +'   drop   constraint   '+quotename(name)  
  from   sysobjects  
  where   xtype='PK'  
  and   object_name(parent_obj)=N'要删除主键的表名'  
  exec(@s)  

posted on 2008-04-16 14:30  阿栋.c#  阅读(216)  评论(0编辑  收藏  举报

导航