Mysql Replace函数使用

1.今天发现数据库中数据有点问题,有些数据在获取的时候多了‘&nbsp’这样的字符。发现SQL有Replace这样的函数。

  用法:

  update tablename set colname=replace(colname,'&nbsp','');

  tablename 是表名;

  colname 是列名;

将字符‘&nbsp’替换为NULL

原文地址:https://www.cnblogs.com/bore3601/p/3010874.html