Export Query Results to CSV with SQL Developer

One of the most universal data interchange formats in the world is the CSV file. Data professionals use CSV’s without a thought. Equally, those not even in the ‘data field’ use CSV’s on a daily basis. Do you have the SQL query results for that report and need to share them in CSV format? Using the Oracle SQL Developer IDE, it is a breeze…


If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

There are times as an SQL Professional you have to go deep in the thick of it to get that data and those insights out of the database. Providing information from data is part of our jobs. Taking it a step further, oftentimes others’ in the workflow need that same data and those same insights to do their best work. And what is one of the most understood and easiest ways to share data?

The CSV file.

If you are working with the Oracle database and using SQL Developer, the IDE has an easy-to-use interface for exporting data. You can export query results to various formats however, in this post, we will look at saving them to a CSV file.

Export Query Results to CSV

For the examples in this post I am using this fictitious FRIENDS table and data:


The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Step 1: Query Results for export

Right-click anywhere on the query results you wish to save to a CSV file and choose Export as shown in the following screenshot:

Export menu in Oracle SQL Developer

Once Export is clicked, an Export Wizard dialogue opens (shown in the next section).

Step 2: Configure export options

Follow these steps in the opened Export Wizard:

  • Select csv from the list of choices in the Format: dropdown.
  • Use the Browse button and choose a destination to save the CSV file to. Also, name the file at this step as well and it is shown in the File: section.
  • Click the Next button to proceed to the 2nd dialogue interface.
Oracle SQL Developer Export Wizard Step 1.

(Note: I mostly leave all other settings to their defaults here. One thing you may do differently is un select the Header checkbox if you do not want a header row of column names in the exported CSV file.)

Are you a Medium member? If so, receive an email notification each time I publish a blog post if you prefer the Medium platform. Not a member? No worries! Use my sign-up link (I will get a commission at no extra cost to you) and join. I really enjoy reading all the great content there and I know you will too!!!

Step 3: Finish export and view CSV file

All that is left to do is review the individual steps of the provided Export Summary (if desired) and click the Finish button.

Export Wizard Step 2 – Finish

Opening up the saved friend_export.csv file in LibreOffice, we can see the same query results from SQL Developer now saved into a CSV file.

Query results exported to CSV file.

How simple is that?

As always, if you have any questions or see any mistakes in the code, please let me know via the comments. Constructive comments help me provide accurate blog posts and are much appreciated.

Discover premium articles, in-depth guides, instructional videos, and much more by joining the “MySQL Learning Tier” membership. You have access to exclusive content unpublished anywhere else with this membership. With new content being added regularly, continue learning MySQL at any level.

Similar blog posts and tutorials covering CSVs

I have written several other blog posts covering various SQL implementations’ and their IDE’s/GUI’s steps to either import or export CSV data. For more great content, check them out from the list below!

Consider making a donation as I continue to provide valuable content here on my blog. Thank you so much!!! Every bit is much appreciated and helps tremendously!

Like what you have read? See anything incorrect? Please comment below and thank you for reading!!!

A Call To Action!

Thank you for taking the time to read this post. I truly hope you discovered something interesting and enlightening. Please share your findings here, with someone else you know who would get the same value out of it as well.

Visit the Portfolio-Projects page to see blog posts/technical writing I have completed for clients.

To receive email notifications (Never Spam) from this blog (“Digital Owl’s Prose”) for the latest blog posts as they are published, please subscribe (of your own volition) by clicking the β€˜Click To Subscribe!’ button in the sidebar on the homepage! (Feel free at any time to review the Digital Owl’s Prose Privacy Policy Page for any questions you may have about: email updates, opt-in, opt-out, contact forms, etc…)

Be sure and visit the “Best Of” page for a collection of my best blog posts.

Josh Otwell has a passion to study and grow as a SQL Developer and blogger. Other favorite activities find him with his nose buried in a good book, article, or the Linux command line. Among those, he shares a love of tabletop RPG games, reading fantasy novels, and spending time with his wife and two daughters.

Disclaimer: The examples presented in this post are hypothetical ideas of how to achieve similar types of results. They are not the utmost best solution(s). The majority, if not all, of the examples provided, are performed on a personal development/learning workstation environment and should not be considered production quality or ready. Your particular goals and needs may vary. Use those practices that best benefit your needs and goals. Opinions are my own.

More ways I can help

Disclosure: Some of this blog post’s services and product links are affiliate links. At no additional cost to you, should you make a purchase by clicking through one of them, I will receive a commission.

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Hey thanks for commenting! Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.