# CSV to SQL

Turn a CSV file into SQL INSERT statements and a matching CREATE TABLE. The first row names the columns, and each column gets a type inferred from its values, such as INTEGER, DOUBLE, BOOLEAN, DATE or VARCHAR. Choose MySQL, PostgreSQL, SQLite or SQL Server, and the quoting and types follow that dialect.

## Frequently asked questions

### How are column types chosen?

Each column takes the narrowest type that fits all its values: whole numbers become INTEGER, or BIGINT beyond 32 bits, numbers with decimals become a floating point type, true and false become BOOLEAN (BIT in SQL Server, INTEGER in SQLite), YYYY-MM-DD becomes DATE and ISO date-times become DATETIME or TIMESTAMP. Everything else is text.

### What happens to values with leading zeros?

Values such as 00123 or 007 are treated as text, not numbers, so zip codes, phone numbers and IDs keep their zeros.

### How are empty cells handled?

By default an empty cell becomes NULL, and a column with no empty cells gets NOT NULL. Turn off the empty cell option to insert empty strings instead.

### How are quotes and special characters escaped?

Single quotes in values are doubled, as standard SQL requires. For MySQL, backslashes are doubled as well, and for SQL Server strings are written as N'...' so Unicode text is stored correctly.

### What does rows per INSERT mean?

Rows are grouped into multi-row INSERT statements, 100 per statement by default. Smaller batches suit databases with strict statement size limits, and SQL Server accepts at most 1,000 rows in one VALUES list.

### How large can the CSV be?

Up to 10,000 data rows and 200 columns. The delimiter is detected automatically, or you can choose comma, semicolon, tab or pipe.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
