去除Mysql中的换行符和回车符

1,去除换行符

-- 去除换行符可以使用以下两种方式

update tableName set colName =  REPLACE(colName, '
', '');

update tableName set colName =  REPLACE(colName, char(10), '');

2,去除回车符

-- 去除回车符可以使用以下两种方式

update tableName set colName =  REPLACE(colName, '
', '');

update tableName set colName =  REPLACE(colName, char(13), '');
posted @ 2022-08-10 14:15  龙卷风之殇  阅读(5571)  评论(1)    收藏  举报