/*
删除指定表的所有索引,包括主键索引,唯一索引和普通索引
调用:
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/ ]
相关文章:
- SQLServer2005数据库还原到SQLServer2000(2007-11-20 4:29:0)
- MSSQL Server中DATETIME类型数据的处理(2007-11-18 9:6:4)
- mssql转移到word(2007-11-15 1:42:20)
- join 方式(2007-11-11 8:59:26)
- 使用MSSQL自定义函数过滤字符串(2007-11-1 1:19:3)
- 数据库设计的折衷(2007-10-14 9:4:0)
- sql server 如何复制数据库结构(2007-9-10 3:28:20)
- 堵死SQLServer注入漏洞(2007-9-8 1:27:12)
- 通过SQLSERVER重启SQLSERVER服务和计算机(2007-9-7 9:46:51)
- SQL Server 连接基础知识(2007-9-1 11:45:42)
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
