将mysl结果存储在txt文件中时,以'\ n'终止的行不起作用

时间:2019-03-13 03:47:31

标签: mysql sql mysqli

当我尝试将mysql结果存储在终止的txt文件行中时

select * from users INTO OUTFILE '/var/lib/mysql- 
files/users.txt'
FIELDS TERMINATED BY '|'
ENCLOSED BY '"'
LINES TERMINATED BY '\n';---> not working 

结果全部放在一行     “ 1” |“ John@test.com” |“ 20” |“ John” |“ test” /“ 2” |“ omar@test.com” |“ 21” |“ Omar” |“ test2”“ 3” |“ Mytest@test.com” |“ 30” |“ Mytest” |“ test3”

0 个答案:

没有答案