SELECT `col 1`, `col 2`, `col 3`, `col 4`, `col 5`
FROM table_name
INTO OUTFILE '/test.csv'
CHARACTER SET utf8
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"' ESCAPED BY '\"'
LINES TERMINATED BY '\n'
I've done the query above to escape double quotes, but I want to escape both the backslash and double quotes characters in same query.