查找字段值替换里面的内容
select Change=Replace(Change,'Pass','select') from table
Change字段有多种值,什么方法可以将Change字段中 'Pass'和'No Pass'都查找替换成 'select'
------解决方案--------------------update tb set Change=Replace(Change,'No Pass','select')
where Change like '%No Pass%'
update tb set Change=Replace(Change,'Pass','select')
where Change like '%Pass%'
------解决方案--------------------update tb set col=replace(replace(col,'No Pass','select'),'Pass','select')
where col like '%Pass%'
------解决方案--------------------update 表 set change=replace(replace(change,'No Pass','select'),'Pass','select')
------解决方案--------------------
UPDATE TB
SET CHANGE=REPLACE(REPLACE(CHANGE,'NO ',''),'PASS','SELECT')
------解决方案--------------------
update tb set Change=Replace(Change,'No Pass','select')
update tb set Change=Replace(Change,'Pass','select')
------解决方案--------------------
select Change=Replace(Replace(Change,'No Pass','Pass'),'Pass','select') from table
--先把No Pass替换成Pass,再把Pass替换成select