Script output to file when using SQL-Developer

徘徊边缘 提交于 2019-12-05 01:13:17

Instead of using Run Script (F5), use Run Statement (Ctrl+Enter). Run Statement fetches 50 records at a time and displays them as you scroll through the results...but you can save the entire output to a file by right-clicking over the results and selecting Export Data -> csv/html/etc.

I'm a newbie SQLDeveloper user, so if there is a better way please let me know.

Yes you can increase the size of the Worksheet by change the setting Tool-->Preferences - >Database -> Worksheet -> Max rows to print in a script(depends on you).

This question is really old, but posting this so it might help someone with a similar issue.

You can store your query in a query.sql file and and run it as a script. Here is a sample query.sql:

spool "C:\path\query_result.txt";
select * from my_table;
spool off;

In oracle sql developer you can just run this script like this and you should be able to get the result in your query_result.txt file.

@"C:\Path\to\script.sql"

Mike G answer will work if you only want the output of a single statement.

However, if you want the output of a whole sql script with several statements, SQL*Plus reports, and some other output formats, you can use the spool command the same way as it is used in SQL*Plus.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!