数据库SQLSERVER2000
假设,我现在用一个News表,里面的content字段,为text类型,
这个表里面有很多数据,而content里面包含很多相同的关键字

比如说这是某条记录的content:“我们都知道A产品受到广大消费者的青睐” 现在我想把其中“A产品” 换成“B产品”

update NEWS set CONTENT=replace(cast(CONTENT as varchar(8000)),'产品1','产品2')


sql替换语句

update `db` set url=REPLACE(url,'http://newcpu.com','http://newcpu.net')

 

sql替换语句

update `db` set url=REPLACE(url,'http://okbzok.com','http://okbz.net')

 

相关文章:

  • 2022-01-07
  • 2021-10-30
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
相关资源
相似解决方案