是否可以在使用 MySQL INTO OUTFILE
时以某种方式包含标题?
Is it possible to include the headers somehow when using the MySQL INTO OUTFILE
?
您必须自己对这些标题进行硬编码.类似的东西:
You'd have to hard code those headers yourself. Something like:
SELECT 'ColName1', 'ColName2', 'ColName3'
UNION ALL
SELECT ColName1, ColName2, ColName3
FROM YourTable
INTO OUTFILE '/path/outfile'
这篇关于使用 SELECT INTO OUTFILE 时包含标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!