现在将这个表导出为文本文件:c:\data_out.txt。
复制代码 代码如下:
select name,age,city,salary
into outfile “c:/data_out.txt”
lines terminated by “\r\n”
from person;
复制代码 代码如下:
select name,age,city,salary
into outfile “c:/data_out.txt”
lines terminated by “\r\n”
from person;
本文介绍了一种使用SQL语句将数据库中的特定字段导出到文本文件的方法。通过指定文件路径及行列终止符,可以方便地将数据以指定格式保存在本地文件中。
992

被折叠的 条评论
为什么被折叠?



