如何在 Oracle SQL Developer 中将查询结果导出到 csv?

2021-12-05 00:00:00 csv export oracle oracle-sqldeveloper

我使用的是 Oracle SQL Developer 3.0.试图弄清楚如何将查询结果导出到文本文件(最好是 CSV).右键单击查询结果窗口没有给我任何导出选项.

I'm using Oracle SQL Developer 3.0. Trying to figure out how to export a query result to a text file (preferably CSV). Right clicking on the query results window doesn't give me any export options.

推荐答案

我使用的版本

2012 年 5 月 5 日更新

Jeff Smith 拥有 blogged 显示,我认为是从 SQL 获取 CSV 输出的优越方法开发商.Jeff的方法如下图方法1所示:

Jeff Smith has blogged showing, what I believe is the superior method to get CSV output from SQL Developer. Jeff's method is shown as Method 1 below:

方法一

将注释 /*csv*/ 添加到您的 SQL 查询并将查询作为脚本运行(使用 F5 或工作表工具栏上的第二个执行按钮)

Add the comment /*csv*/ to your SQL query and run the query as a script (using F5 or the 2nd execution button on the worksheet toolbar)

就是这样.

方法二

运行查询

右键单击并选择卸载.

更新.在Sql Developer Version 3.0.04 unload 已经改为export感谢 Janis Peisenieks 指出这一点

Update. In Sql Developer Version 3.0.04 unload has been changed to export Thanks to Janis Peisenieks for pointing this out

为 SQL Developer 版本 3.0.04 修改屏幕截图

从格式下拉列表中选择 CSV

并按照屏幕上的其余说明进行操作.

相关文章