MySQL outfile使用行起始字符串生成的文件

时间:2016-07-15 06:19:21

标签: mysql into-outfile

如何使用特定字符串启动MySQL outfile生成的文件?

我目前正在使用以下查询:

SELECT * FROM rmssettings
INTO OUTFILE 'F:\\Assignment\\VIEWS1.sql'
FIELDS TERMINATED BY ',' LINES STARTING BY 'Insert' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n';

1 个答案:

答案 0 :(得分:0)

你想要开始的字符串是什么样的?

你可以这样做:

SELECT "foo, bar, baz, hello\n", rmssettings.* FROM rmssettings
INTO OUTFILE 'F:\\Assignment\\VIEWS1.sql'
...