nbjjy 发表于 2013-9-2 22:03:33

删除所有存储过程的sql语句

declare @procName varchar(500)
declare cur cursor
for select 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
页: [1]
查看完整版本: 删除所有存储过程的sql语句