且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2021-11-04 22:35:13

我使用的版本

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

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