这个好像有点问题,譬如我content字段中含有“美女 美女123”,我现在只是想严格替换“美女”,而如果有“**美女**”,这样的则不要替换,请问可以实现吗?
--------------------------------------------------------------------------
检测 1.美女是不是在首部,charindex('美女',content)=1 and content like '美女 %'
2.在中间 content like '% 美女 %'
3.在后面 charindex('女美',REVERSE(content))=1 and content like '% 美女'
update [table] set content='BBB' where content='AAA'--如果是等的意思
update [table] set content=replace(content,'BBB','AAA' where content like '%AAA%'
--如果是包含的意思
看数据量,一般不会