去除mysql字段中的空格换行

2020-8-18 流沙 PHP

清理垃圾数据用


UPDATE quality_rule_detail SET rule_detail_id = REPLACE(REPLACE(REPLACE(REPLACE(rule_detail_id, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET rule_type_id = REPLACE(REPLACE(REPLACE(REPLACE(rule_type_id, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET rule_field_id = REPLACE(REPLACE(REPLACE(REPLACE(rule_field_id, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET field_key = REPLACE(REPLACE(REPLACE(REPLACE(field_key, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET field_name = REPLACE(REPLACE(REPLACE(REPLACE(field_name, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET field_type = REPLACE(REPLACE(REPLACE(REPLACE(field_type, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');
UPDATE quality_rule_detail SET platform = REPLACE(REPLACE(REPLACE(REPLACE(platform, CHAR(34), ''),CHAR(13),''),CHAR(10),''),CHAR(9),'');

发表评论:

Powered by 流沙团

备案号:鄂ICP备15017378号-1