Type mapping by database
| Data | PostgreSQL | MySQL | SQLite | SQL Server | Oracle |
|---|---|---|---|---|---|
| Whole numbers | INTEGER / BIGINT | INTEGER / BIGINT | INTEGER | INTEGER / BIGINT | NUMBER(10) / NUMBER(19) |
| Decimals | NUMERIC(p,s) | DECIMAL(p,s) | REAL | DECIMAL(p,s) | NUMBER(p,s) |
| true / false | BOOLEAN | BOOLEAN | INTEGER (0/1) | BIT | NUMBER(1) |
| 2026-01-15 | DATE | DATE | TEXT | DATE | DATE |
| 2026-01-15 09:30:00 | TIMESTAMP | DATETIME | TEXT | DATETIME2 | TIMESTAMP |
| Text | TEXT | VARCHAR(n) / TEXT | TEXT | NVARCHAR(n) | VARCHAR2(n CHAR) |
Fractional seconds use explicit precision, such as DATETIME(6) for MySQL.
When a column exceeds the database’s supported time precision, it stays text to preserve the values.
SQL Server text widths count UTF-16 units so supplementary characters such as emoji fit.
Identifiers are quoted only when needed: names with spaces, capitals or reserved words like order and
user get "double quotes", `backticks` in MySQL or [brackets] in SQL
Server. Turn on snake_case columns to avoid quoting entirely.
Loading big CSV files directly
For files with hundreds of thousands of rows, generate just the CREATE TABLE here, then use the database’s bulk loader, which is far faster than INSERTs:
\copy people FROM 'people.csv' WITH (FORMAT csv, HEADER true)
LOAD DATA LOCAL INFILE 'people.csv' INTO TABLE people
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
IGNORE 1 LINES;
sqlite3 app.db ".import --csv --skip 1 people.csv people"
Have JSON instead? Use JSON to SQL. To inspect the CSV first, open it in the CSV viewer, and tidy the generated SQL with the SQL formatter.
Frequently asked questions
How are column types detected?
Each column is checked across all rows. Whole numbers become INTEGER (or BIGINT beyond 2,147,483,647), numbers with decimals become DECIMAL with a precision and scale that fit every value, true/false becomes BOOLEAN, valid YYYY-MM-DD dates become DATE and valid ISO date-times become TIMESTAMP. Offsets must be within ±14:00. Invalid dates or offsets make the entire column text, sized to the longest value. Values with leading zeros, like ZIP codes 00501, stay text so the zeros aren’t lost.
How are quotes and special characters escaped?
Single quotes are doubled (O'Brien becomes 'O''Brien'), which works in every database. For MySQL and MariaDB, backslashes are also doubled, because MySQL treats \ as an escape character inside strings by default. For SQL Server, strings with non-ASCII characters get the N prefix (N'café') so they are stored as Unicode.
Is it faster to use one INSERT per row or multi-row INSERTs?
Multi-row INSERTs are much faster: one statement with 500 rows is parsed and committed once instead of 500 times. SQL Server limits a VALUES list to 1,000 rows, so batches are capped there. For Oracle the tool writes one INSERT per row, which works on every version. For very large files, use your database’s bulk loader instead (see below).
What happens to empty cells?
By default they become NULL, and the column is created without NOT NULL. Turn off “Empty cells as NULL” to insert empty strings instead. Columns where every row has a value are marked NOT NULL in the CREATE TABLE.
Is my CSV uploaded?
No. The file is read and converted in your browser, so customer lists and exports never leave your computer. You can download the result as a .sql file.