faqts : Computers : Databases : MySQL : Language and Syntax : Queries : Into Outfile

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 13 people (69%) answered Yes
Recently 6 of 9 people (67%) answered Yes

Entry

Why do I get lots of backslashes when I use "SELECT ... INTO OUTFILE"?
Why does "INTO OUTFILE" escape backslashes?

Feb 8th, 2000 05:35
Nathan Wallace, Michael Widenius


This is completely normal!  The reason for this is that INTO OUTFILE
escapes all escape characters (\ by default) to make it possible to read
the data back with LOAD DATA INFILE...

Fix:  Use 

    ... INTO OUTFILE... ESCAPED BY "" ...