Novikov is correct, but when exporting, you can also avoid the appearance of new characters.
SELECT REPLACE(`fieldname1`,'\n','\\n'),`fieldname2` FROM db.table INTO OUTFILE 'c:/result.txt' FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY '"' LINES TERMINATED BY '\r\n';
This will replace all newline characters with the text string '\ n'. Perhaps this is not what you want in the output.
DC
Developerchris
source share