Can somebody please help me understand what is ESCAPED BY
clause means in LOAD DATA LOCAL INFILE
statement MySQL 5.5. I am a newbie to MySQL so please bear with me.
Mysql – ESCAPED BY clause in LOAD DATA INFILE
loadMySQLmysql-5.5
Related Question
- MySQL LOAD DATA – Convert ‘False’ String to Boolean
- How to Speed Up MySQL LOAD DATA LOCAL INFILE for Large Data
- Mysql – Load csv file to thesql using load data local infile
- MySQL Load Data Infile extremely slow
- MySQL LOAD DATA LOCAL INFILE Changing Special Characters
- MySQL 5.5 – Fixing Load Data Infile ERROR 1064
Best Answer
Generally the defaults cause LOAD DATA INFILE to act as follows when reading input:
Look for line boundaries at newlines.
Break lines into fields at tabs.
Do not expect fields to be enclosed within any quoting characters.
Interpret occurrences of tab, newline, or
\' preceded by
\' as literal characters that are part of field values.Conversely, the defaults cause SELECT ... INTO OUTFILE to act as follows when writing output:
Write tabs between fields.
Do not enclose fields within any quoting characters.
Use
\' to escape instances of tab, newline or
\' that occur within field values.Write newlines at the ends of lines.
Note that to write FIELDS ESCAPED BY '\\', you must specify two backslashes for the value to be read as a single backslash.
For Further Details Please Have a Look at following Link :- dev.mysql.com/doc/refman/5.1/en/load-data.html