惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
Arctic Wolf
T
Tenable Blog
T
Troy Hunt's Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy & Cybersecurity Law Blog
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Hacker News: Front Page
S
Secure Thoughts
AWS News Blog
AWS News Blog
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
M
MIT News - Artificial intelligence
T
Tor Project blog
S
Schneier on Security
PCI Perspectives
PCI Perspectives
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
美团技术团队
Google DeepMind News
Google DeepMind News
V
Visual Studio Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
罗磊的独立博客
T
Threat Research - Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
V2EX
C
CXSECURITY Database RSS Feed - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
GRAHAM CLULEY
L
LINUX DO - 热门话题
D
Docker
J
Java Code Geeks
GbyAI
GbyAI
H
Heimdal Security Blog
The Hacker News
The Hacker News
MongoDB | Blog
MongoDB | Blog
V
Vulnerabilities – Threatpost
T
Tailwind CSS Blog
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
C
CERT Recently Published Vulnerability Notes
Y
Y Combinator Blog
Recorded Future
Recorded Future
Cisco Talos Blog
Cisco Talos Blog
T
Threatpost
The Register - Security
The Register - Security
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 恋地高飞

超级弹窗代码(P2P,360都拦截不了 baset64加密解密代码 com/c.js木马攻击...(转) asp.net TextBox显示密码 - 恋地高飞 - 博客园 Ext.Window窗口下onclick="Button1_Click",不能提交的问题 IIS7 中使用 UrlRewritingNet(转) Reflector使用手记 学习SQL Server全文索引 (转 ) 查询同一表内多字段同时重复记录的SQL语句 asp.net中Excel导入(使用微软OLEDB驱动) asp.net获取URL和IP地址 警告: 程序集绑定日志记录被关闭。 Repeater1绑定数据,编辑数据的一些参考文章 asp.net下linkbutton的前后台使用方法 sqlserver 中判断是否数字,是否汉字的方法 301永久重定向asp.net实现方法 Net程序如何防止被注入 UrlRewritingNet 完美实现 ASP.NET 2.0 中的URL重写(映射) (转) FusionCharts一款flash统计控件,可以用于C#
sql批量修改表名(前缀)--亲测
恋地高飞 · 2012-01-08 · via 博客园 - 恋地高飞

exec   sp_msforeachtable    
@command1='
  declare   @o   sysname,@n   sysname    
  select   @o=''?''  
  ,@n=stuff(@o,1,charindex(''].[fg_'',@o)+6,''fgjzw_'')  
  ,@n=left(@n,len(@n)-1)  
  exec   sp_rename   @o,@n',  
  @whereand='   and   o.name   like   ''fg_%'''

declare @oldName varchar(30), @newName varchar(30)
declare cursor_taname CURSOR FOR SELECT name,name as newname FROM sysobjects where type='u'
OPEN cursor_taname FETCH NEXT FROM cursor_taname INTO @oldname,@newName WHILE @@FETCH_STATUS=0
BEGIN set @newName=Replace(@newName,'W_','M_') print(@oldname+', mailto:%20+@newName) EXEC sp_rename @oldname,@newName FETCH NEXT FROM cursor_taname INTO @oldname,@newName

END CLOSE cursor_taname DEALLOCATE cursor_taname

 declare @oldName varchar(30),
 @newName varchar(30)
declare cursor_taname   CURSOR   FOR  
SELECT name,upper(name) as newname FROM sysobjects where type='u'
OPEN   cursor_taname  
FETCH   NEXT   FROM   cursor_taname   INTO   @oldname,@newName
WHILE   @@FETCH_STATUS=0     
  BEGIN 
SET @newName=(replace(@oldname,'Ad','Fzw_Ad'))
 print(@oldname+',   '+@newName)
EXEC   sp_rename  @oldname,@newName
 FETCH   NEXT   FROM   cursor_taname   INTO   @oldname,@newName
  END     
CLOSE   cursor_taname  
DEALLOCATE   cursor_taname

警告: 更改对象名的任一部分都可能会破坏脚本和存储过程。

刷新数据库表名修改成功!