« Gradient滤镜blur方法 »

删除指定表的所有索引

/*
删除指定表的所有索引,包括主键索引,唯一索引和普通索引

调用:
declare @tbName varchar(20)
set @tbName='A'
exec sp_dropindex @tbName

vivianfdlpw 2005.9 引用情保留此信息
*/
if exists(select 1 from sysobjects where id=object_id('sp_dropindex') and xtype='P')
drop procedure sp_dropindex
go
create procedure sp_dropindex
@tbName varchar(20)=null --索引名
as

if @tbName is null
begin
raiserror('必须提供@tbName参数',12,1)
return
end
/*

原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]

相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。