MySQL 去除字段中的换行和回车符

UPDATE tablename SET field = REPLACE(REPLACE(field, CHAR(10), ”), CHAR(13), ”);

char(10):  换行符
char(13):  回车符

Leave a comment

Please be polite and on topic. Your e-mail will never be published.