In MySQL, the following:
SELECT '\\' INTO OUTFILE 'c:/temp/backslash.dump';
writes two backslashes to the file, which makes sense.
Trying to dump a single backslash, I changed SQL_MODE, like that:
SET SESSION SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT '\' INTO OUTFILE 'c:/temp/backslash.dump';
but got two backslashes again.
Is there a way to dump a single backslash?
From stackoverflow
-
Do this:
SELECT '\\' INTO OUTFILE 'c:/temp/backslash.dump' FIELDS ESCAPED BY '|';
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.