mysql 原生语句查找替换字符串


参数说明

  • table_name —— 表的名字
  • field_name —— 字段名
  • from_str —— 需要替换的字符串
  • to_str —— 替换成的字符串

代码

  1. update `table_name` set `field_name` = replace(`field_name`,'from_str','to_str')

BLOG

搜索文章