2010-07-15 60 views

回答

2
REPLACE(IFNULL(content , ''), '\n' , '<br/>') as content 
2

嘗試:

SELECT id, title, REPLACE(content , CHR(13), ' ') as content 
INTO OUTFILE '/content.csv' 
FIELDS TERMINATED BY ',' ESCAPED BY '\\' OPTIONALLY ENCLOSED BY '"' 
LINES TERMINATED BY '\n' 
FROM content 

其中CHR(13)代表新的生產線。