Convert CSV to SQL INSERT Statements
Turn a CSV into INSERT statements with a table name you choose, quoting strings and leaving numbers bare so the script runs as written.
How to use
- Paste the CSV, header row included.
- Enter the target table name.
- Copy the generated INSERT statements.
Frequently asked questions
How are column names derived?
From the header row, in order. Rename them first with the CSV column mapper if they do not match the columns in your table.
Are values quoted correctly?
Strings are quoted and internal quotes escaped; numbers are left bare so they are not inserted into a numeric column as text.
Are empty cells inserted as NULL?
An empty field becomes NULL rather than an empty string, which is usually what you want but is worth checking against your schema's constraints.
Should I run this against production?
Review the output first and run it inside a transaction. A generated script is a starting point, not something to paste straight into a live database.
Last updated
Powered by maratool