alexmen

专注.net软件开发,项目管理体系PMBOK.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
create proc PROC_BATCH_DEL_RPOC
AS
declare proccur cursor
    for
        select [name] from sysobjects where type= 'P' and name like '%proc%'
declare @procname varchar( 100)
open proccur
fetch next from proccur into @procname
while(@@FETCH_STATUS = 0 )
begin  
    exec('drop proc ' + @procname)  --本句被注释,使用时请取消
    print(@procname + '已被删除' )
    fetch next from proccur into @procname
end
close proccur
deallocate proccur

 

posted on 2016-01-18 17:47  alexmen  阅读(163)  评论(0编辑  收藏  举报