|
发表于 2020-12-16 20:30:02
|
显示全部楼层
如果过滤后的存储过程不是很多的话
试试:
declare @str varchar(8000),@T_sql varchar(8000)
set @str=''
select @str=@str+','+name from sysobjects where xtype='P' and name like 'usp_%'
select @str=stuff(@str,1,1,'')
set @T_sql='drop proc '
set @T_sql=@T_sql+replace(@str,',',' drop proc ')+''
select @T_sql
exec(@T_sql)
|
|