CSV to Oracle
Turn a CSV export into a Oracle table: a CREATE TABLE with sensible types and INSERT statements you can run as they are.
CREATE TABLE imported_rows ( id NUMBER(10) NOT NULL, email VARCHAR2(32) NOT NULL, signup_date DATE NOT NULL, plan VARCHAR2(16) NOT NULL, monthly_fee NUMBER NOT NULL, is_active NUMBER(1) NOT NULL ); INSERT ALL INTO imported_rows (id, email, signup_date, plan, monthly_fee, is_active) VALUES (1, 'ada@example.com', DATE '2026-01-14', 'pro', 29.00, 1) INTO imported_rows (id, email, signup_date, plan, monthly_fee, is_active) VALUES (2, 'grace@example.com', DATE '2026-02-02', 'free', 0, 1) INTO imported_rows (id, email, signup_date, plan, monthly_fee, is_active) VALUES (3, 'O''Brien, Kate', DATE '2026-02-19', 'team', 99.50, 0) SELECT 1 FROM DUAL;
Detected columns
Types are inferred from every value in the column. Override any that are wrong: zip codes and phone numbers with leading zeros stay text on purpose.
| Column | Type | Nullable | Longest value |
|---|---|---|---|
id | no | 1 | |
email | no | 17 | |
signup_date | no | 10 | |
plan | no | 4 | |
monthly_fee | no | 5 | |
is_active | no | 5 |
Big file? Use Oracle’s bulk loader
Copy just the CREATE TABLE statement from the output above, run it, then load the whole file straight into the new table:
-- SQL*Loader control file (load.ctl) LOAD DATA INFILE 'data.csv' INTO TABLE imported_rows FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (id, email, signup_date DATE 'YYYY-MM-DD')
Run with sqlldr userid=… control=load.ctl skip=1. The generated script uses INSERT ALL … SELECT 1 FROM DUAL, which works on all Oracle versions.
Other databases
CSV to MySQL · CSV to PostgreSQL · CSV to SQL Server · CSV to SQLite · JSON to SQL
Questions
How do I convert a CSV file to Oracle INSERT statements?
Paste the CSV or open the file, check the detected column types, and copy or download the script. It contains a Oracle CREATE TABLE (optional) followed by multi-row INSERT statements in batches you choose.
How do I import a large CSV into Oracle?
For more than about 100,000 rows, use the bulk loader shown on this page. It is much faster than running INSERT statements. Generate the CREATE TABLE here, then bulk-load the file into it.
Which Oracle data types are used?
Whole numbers become integer types, decimals become exact numeric types (never floating point), true/false values become booleans, ISO dates and timestamps become date/time types, and everything else becomes a text type sized from the longest value. You can override any column.
Is my file uploaded?
No. The CSV is parsed and converted in your browser, and nothing is sent to a server.
Related tools
- CSV to SQLCREATE TABLE with inferred types plus batched INSERT statements.
- SQL Data TypesThe same type across MySQL, PostgreSQL, SQL Server, Oracle and SQLite.
- ER Diagram GeneratorPaste CREATE TABLE statements or DBML and get a draggable crow’s-foot diagram.
- JSON to SQLFlatten a JSON array of objects into a table and INSERTs.