mysql 将查询结果输出到文件
// 不能创建文件夹,可以创建文件
$ select * into outfile 'path' form tab_name where ...
默认输出格式
- 字段:fields terminated by ‘\t’ enclosed by ” escaped by ‘\’
- 行:lines terminated by ‘\n’ starting by ”
// 修改输出格式
$ select * into outfile 'path'
fields terminated by ','
lines terminated by '\n' starting by 'start:'
form tab_name where ...
// 二进制格式
$ select * into dumpfile 'path' form tab_name where ...