Skip to main content
SQL Developer — help/export-csv.md
CSV · Excel · JSON · XML

How to Download Data from SQL Developer

Learn how to download data from SQL Developer by exporting query results to CSV, Excel, JSON, or other formats. Works with Oracle, MySQL, PostgreSQL, and all supported databases.

~/export/job.spec job overview

# Export job

source = query result grid

formats = CSV · Excel · JSON · XML · SQL INSERT

max_rows = unlimited (use LIMIT for samples)

encoding = UTF-8 recommended

# Setup info

time = 1 minute # for typical result sets

difficulty = Beginner

steps = 4

prereq = a running SELECT query

// supports batched export for very large tables

Export Query Results to CSV

Four steps. Works the same for every supported database.

STEP_01

Run Your Query

Execute your SELECT statement to display the data you want to export. The results will appear in the grid below.

STEP_02

Right-Click on Results

Right-click anywhere in the results grid. A context menu will appear with several options.

STEP_03

Select Export Format

Click Export and choose your format: CSV, Excel (.xlsx), JSON, XML, or SQL INSERT statements.

STEP_04

Save the File

Choose where to save the file, give it a name, and click Save. That's it.

Export Options Explained

Four formats cover the most common use cases. Pick the one that matches the downstream consumer.

  • CSV — opening in Excel, importing into other databases, general data transfer. Universal format that works everywhere.
  • Excel (.xlsx) — sharing with non-technical users, creating reports. Preserves formatting and supports multiple sheets.
  • JSON — web applications, APIs, JavaScript processing. Preserves data types and nested structures.
  • SQL INSERT — migrating data to another database, creating backups, sharing data that needs to be re-imported exactly.

Tips for Large Exports

Exporting millions of rows? Three settings keep things smooth.

~/tips/limit-test.sqltip 1 · sample first

-- Test the export format with a small sample

SELECT * FROM your_table LIMIT 100;

-- ... then re-run without LIMIT for the full export

~/tips/batch-offset.sqltip 2 · batch by offset

-- For very large tables, export in batches

SELECT * FROM orders LIMIT 100000 OFFSET 0;

SELECT * FROM orders LIMIT 100000 OFFSET 100000;

// avoids memory issues with very large result sets

~/tips/encoding.conftip 3 · encoding

# If data has special characters (accents, emojis, etc.)

encoding = UTF-8

why = prevents mojibake / question marks

Common Export Issues

Three failure modes most often hit when exporting from SQL Developer.

  • !
    Encoding corruption in Excel (Windows-1252 vs UTF-8)
    Special characters (accents, em-dashes, emoji) appear as ? or boxes when the CSV is opened in Excel on Windows. Cause: Excel defaults to Windows-1252 unless the file has a UTF-8 BOM. Fix: in the export wizard, enable "Add BOM" if available, or save as .xlsx directly which preserves UTF-8 by design.
    ENC
  • UI freezes on large result sets
    SQL Developer goes unresponsive while exporting tables > 1M rows because the grid loads everything into memory before writing. Fix: don't export from the result grid — use the Tools → Database Export wizard which streams rows directly to disk, or run a paginated query with LIMIT ... OFFSET and export in chunks.
    PERF
  • Dates exported as ###### or as numeric strings
    CSV preserves dates as text; Excel may read them as serial numbers (45000.5) or fail to align. Cause: ambiguous date format. Fix: in the export wizard, set Date format to YYYY-MM-DD HH24:MI:SS (ISO 8601). Excel parses ISO dates correctly.
    FMT

Related Guides

If you need to import instead, or run scripts.

~/downloads ready.sh

Going the Other Way? Import CSV Instead

The inverse workflow — loading CSV files, Excel sheets, or .txt data into a database table — uses the same Data Wizard with the direction reversed. Six steps, supports millions of rows with batch commits.

// formatsCSV · Excel · text (delimited or fixed-width)
// time2–5 minutes for typical files