修改:
复制代码 代码如下:
declare proccur cursor
for
select [name] from sysobjects where name like 'Foods_%'
declare @procname varchar(100)
declare @temp varchar(100)
open proccur
fetch next from proccur into @procname
while(@@FETCH_STATUS = 0)
begin
set @temp='kcb_'+@procname
EXEC SP_RENAME @procname,@temp

print(@procname + '已被删除')
fetch next from proccur into @procname
end
close proccur
deallocate proccur

declare proccur cursor
for
select [name] from sysobjects where name like 'kcb%'
declare @procname varchar(100)
declare @temp varchar(100)
declare @temp2 varchar(100)
declare @temp3 varchar(100)
open proccur
fetch next from proccur into @procname
while(@@FETCH_STATUS = 0)
begin
set @temp3= LEN(@procname)
set @temp='kcb_'
set @temp2=RIGHT(@procname,@temp3-3)
set @temp+=@temp2
EXEC SP_RENAME @procname,@temp

print(@procname + '已被修改')
fetch next from proccur into @procname
end
close proccur
deallocate proccur

删除:
复制代码 代码如下:
declare proccur cursor
for
select [name] from sysobjects where name like 'Users_%'
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

更多相关文章

  1. [置顶] android 批量插入数据
  2. [Linux] 批量查看Android应用程序的文件名称;
  3. android批量获取res文件中的drawable图片
  4. Eclipse中使用Ant打Android包报错及解决方案
  5. Windows下git下载android source
  6. Android批量打包提速 - 1分钟900个市场不是梦
  7. Android恶意样本批量获取方法
  8. 用gradle 来打包Android
  9. Eclipse中使用Ant打Android包报错解决方案 – Perhaps JAVA_HOME

随机推荐

  1. GOLANG 为什么还有指针
  2. golang 怎么调用c代码
  3. golang 数组存的是什么
  4. golang 怎么设计一个栈
  5. golang 是面向对象的么
  6. golang 怎么拼接字符串
  7. golang 如何读取csv文件
  8. golang有web框架吗
  9. golang 是否需要orm
  10. golang获取当前时间是第几周