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