Skip to main content
SQL Developer — help/import-csv.md
CSV · Excel · text

How to Import CSV to Database in SQL Developer

Load CSV files, Excel spreadsheets, and text files directly into your database tables. Works with Oracle, MySQL, PostgreSQL, and SQL Server.

~/import/csv.spec job overview

# Import job

source = CSV / Excel (.xlsx, .xls) / text (.txt)

target = database table (existing or new)

mode = insert | append | replace

delimiters = comma · tab · semicolon · custom

encoding = UTF-8 (default) · other supported

# Setup info

time = 2 to 5 minutes

difficulty = Beginner

steps = 6

prereq = SQL Developer connected to a database

// supports millions of rows with batch commits

Supported File Formats

SQL Developer's Data Import Wizard reads three common file formats out of the box.

  • CSV (.csv) — most common. Works with any delimiter (comma, tab, semicolon).
  • Excel (.xlsx, .xls) — import directly from Excel spreadsheets. Select specific sheets.
  • Text files (.txt) — fixed-width or delimited text. Custom delimiter support.

Import CSV Step by Step

Six steps to import data into an existing table.

STEP_01

Find Your Table

In the Connections panel, expand your database connection → Tables. Find the table you want to import data into.

STEP_02

Open Import Wizard

Right-click on the table and select Import Data. The Data Import Wizard will open.

STEP_03

Select Your File

Click Browse and select your CSV file. SQL Developer will show a preview of the first few rows.

STEP_04

Configure Options

Header: check if first row contains column names
Delimiter: usually comma, but select tab or semicolon if needed
Encoding: UTF-8 for most files

STEP_05

Map Columns

Match each CSV column to a table column. SQL Developer auto-matches by name, but you can adjust manually.

STEP_06

Finish Import

Click Finish to start the import. Watch the progress bar and check the log for any errors.

Import to a New Table

Don't have a table yet? SQL Developer can create one from your CSV automatically.

  1. Right-click on Tables (not a specific table)
  2. Select Import Data
  3. Choose your CSV file
  4. SQL Developer will suggest column names and data types based on your data
  5. Adjust the table name and column definitions as needed
  6. Click Finish — the table is created and data is imported

Tips for Large Imports

Importing thousands or millions of rows? These three settings make a big difference.

~/tips/indexes.sqltip 1 · indexes

-- Disable indexes before huge imports, then rebuild

ALTER INDEX idx_name UNUSABLE; -- Oracle

-- ... run import ...

ALTER INDEX idx_name REBUILD; -- Up to 10x faster

~/tips/batch-commit.conftip 2 · commits

# In the import wizard, set commit frequency

commit_every = 1000 # to 5000 rows

why = prevents running out of undo space

~/tips/date-format.conftip 3 · dates

# Match your CSV date format to what SQL Developer expects

csv_format = YYYY-MM-DD HH24:MI:SS

configure = in the wizard (Format step)

// Date parsing errors are the #1 cause of failed imports

Common Import Errors

The three errors most commonly hit during a CSV import, with quick fixes.

  • !
    "Value too large for column"
    Your data has values longer than the column allows. Truncate the data, or ALTER TABLE to increase the column size.
    DDL
  • !
    "Invalid number" or "Not a valid date"
    Data type mismatch. A text value is being inserted into a number column, or the date format doesn't match. Check column mapping and format settings.
    TYPE
  • "Unique constraint violated"
    Your CSV contains duplicate values in a unique or primary key column. Remove duplicates from the CSV or change the import mode to update existing rows.
    PK
~/downloads ready.sh

Need to Export Instead?

Export your query results to CSV, Excel, JSON, or SQL INSERT statements. SQL Developer handles both directions.

// platformWindows 10/11 (64-bit)
// licenseFree · No Oracle account required