删除对应的存储过程
use master
DECLARE cursorname cursor for select 'drop PROCEDURE '+name from sysobjects
where name like 'soildwater_%' and xtype = 'p' open cursorname
declare @curname sysname
fetch next from cursorname into @curname
while(@@fetch_status=0)
begin
exec(@curname)
fetch next from cursorname into @curname
end
close cursorname
deallocate cursorname
--删除对应的存储过程,利用相似程度来删除存储过程,这样做会比一个个去删除要快,前提是要有相似性,要是没有相似性就不适合,不知道有没有其他删除非系统存储过程的方法,请大家写下给我谢谢
作者:johnny
出处:http://www.cnblogs.com/sunjunlin
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。