mysql去掉字段中的所有空格

分两步

一、去掉两边空格

update 表名 set 字段1=trim(字段1);

二、去掉中间空格

update 表名 set 字段1=replace(字段1,' ','');

猜你喜欢

转载自blog.csdn.net/qq_30776829/article/details/127073767