Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 MySQL 中,以下内容:
SELECT '\\' INTO OUTFILE 'c:/temp/backslash.dump';
将两个反斜杠写入文件,这是有道理的。
试图转储一个反斜杠,我更改了 SQL_MODE,如下所示:
SET SESSION SQL_MODE='NO_BACKSLASH_ESCAPES'; SELECT '\' INTO OUTFILE 'c:/temp/backslash.dump';
但又得到了两个反斜杠。
有没有办法转储一个反斜杠?
做这个:
SELECT '\\' INTO OUTFILE 'c:/temp/backslash.dump' FIELDS ESCAPED BY '|';