开发者

How to replace column text in SQL Table?

I have column called CommPostCommUrl in table CommunitiesPostings has text value.

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

Replace column text to

CommPostCommUrl
--------------------
http://communitiesdev.site.com/TIGS
http://co开发者_如何学Pythonmmunitiesdev.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

Please provide me Query


UPDATE Table
SET CommonPostURL = REPLACE(CommonPostURL , 
                            'http://communities.',
                            'http://communitiesdev.')


UPDATE CommunitiesPostings
SET CommPostCommUrl = REPLACE (CommPostCommUrl,'communities','communitiesdev')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜