Mysql 查询文件中的定界符
在下面的查询中,如果 desc 中包含“\”,并且该文件在由 openoffice 打开时,\ 会出现在不同的位置中。城市列也会发生这种情况,如何重新执行此操作。
select first_name, last_name, emp_id,desc,city from emp_table where event_id = 4 order by city asc into OUTFILE "/tmp/Sep10-1.csv" FIELDS TERMINATED BY ",";
In the following query if desc has "\" in it and this file when opened by openoffice the \ and appears in a different coulmn.This also happens with city column,How to recitfy this..
select first_name, last_name, emp_id,desc,city from emp_table where event_id = 4 order by city asc into OUTFILE "/tmp/Sep10-1.csv" FIELDS TERMINATED BY ",";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
ESCAPED BY
子句以转义转储中的特殊字符。Add
ESCAPED BY
clause to escape special characters in dump.