语法:select
字段
from
表名 into
outfile 路径
示例txt:select
*
from
stu_class into
outfile ‘./stu_class.text‘;
示例csv:select
*
from
stu_class into
outfile ‘./stu_class.text‘;
如果需要按照指定格式分隔数据呢?
使用可选选项:fields terminated by "-";
示例:select
*
from
stu_class into
outfile ‘c:/mysql/help/stu_class.txt‘ fields terminated by "-";