content= 'asnfojassozxpdsgdspdps神龙架谁骄傲的骄傲搜ID飞机扫'


SELECT content FROM test WHERE id =1 吧zx替换成ZZZZ UPDATE test SET content = REPLACE(content,'zx','ZZZZ') WHERE id =1

content  =   asnfojassoZZZZpdsgdspdps神龙架谁骄傲的骄傲搜ID飞机扫

吧ZZZZ到神龙架之间的内容替换成空
UPDATE test SET content = 
INSERT(content, INSTR(content,'ZZZZ')+LENGTH('ZZZZ'), INSTR(content,'神农架')- INSTR(content,'ZZZZ')-LENGTH('神农架'),'')
WHERE id =1
content  = 

 

`INSERT`(str,pos,len,newstr)

str 需要替换的字段

pos其实位置

len 长度

newstr 需要替换的字符

 

相关文章:

  • 2022-12-23
  • 2021-12-24
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2023-03-20
相关资源
相似解决方案