浏览:345 2008-06-16 18:17 来自 dudu      :
 

     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
收藏 楼主
  3个月前 【组长】 玉开      :
这个方法会不会删系统存储过程呀?
1楼 回到顶楼 
  3个月前  dudu      :
@玉开
不会。
2楼 回到顶楼 
  3个月前  电机拖动      :
只要不在系统数据库里面删,不怕

实在害怕,就加上schema限制一下
3楼 回到顶楼 

注册用户登录后才能回复,登录注册
> 返回“Sql Server数据库小组”


其他话题

相关内容

相关链接

1 1