我在表CommPostCommUrl
中有一个名为CommunitiesPostings
的列具有文本值。
CommPostCommUrl
--------------------
http://communities.site.com/TIGS
http://communities.site.com/TIGS
http://communities.site.com/Leaders
http://communities.site.com/Specialty
http://communities.site.com/Specialty
http://communities.site.com/PN
http://communities.site.com/TIGS/SIM
将列文字替换为
CommPostCommUrl
--------------------
http://communitiesdev.site.com/TIGS
http://communitiesdev.site.com/TIGS
http://communitiesdev.site.com/Leaders
http://communitiesdev.site.com/Specialty
http://communitiesdev.site.com/Specialty
http://communitiesdev.site.com/PN
http://communitiesdev.site.com/TIGS/SIM
请提供我的查询
答案 0 :(得分:2)
UPDATE Table
SET CommonPostURL = REPLACE(CommonPostURL ,
'http://communities.',
'http://communitiesdev.')
答案 1 :(得分:2)
UPDATE CommunitiesPostings
SET CommPostCommUrl = REPLACE (CommPostCommUrl,'communities','communitiesdev')