select * from sys.procedures
这段sql可以查出所有的存储过程,然后,哈哈~~?
declare @sql varchar(4000) set @sql='' select @sql=@sql+'drop proc '+name+'; ' from sys.procedures print @sql exec(@sql)
1. 在Management Studio中,选中对应的数据库->Programmability->Stored Procedures
2. 按F7键,在右侧的窗口中选中除System Stored Procedures之外的所有存储过程
3. 点击鼠标右键,选择“删除”
用TSQL,不能用GUI界面来删除
@桦仔: 那就是是一楼的方法呗
declare @procName varchar(500)
declare cur cursor
for select [name] from sys.objects where type = 'p'
open cur
fetch next from cur into @procName
while @@fetch_status = 0
begin
if @procName <> 'DeleteAllProcedures'
exec('drop procedure ' + @procName)
fetch next from cur into @procName
end
close cur
deallocate cur