Turn SQL INSERT statements back into a spreadsheet. Paste a dump or drop .sql files and get a CSV with the column names as the header — multi-row VALUES, escaped quotes, NULLs and comments included. Works with MySQL, PostgreSQL, SQLite and SQL Server syntax.
| SQL | CSV cell |
|---|---|
| 'O''Brien' | O'Brien |
| 'it\'s' | it's |
| NULL | (empty) |
| NOW() | NOW() |
Yes. A real tokenizer reads the values, not a regex.
It becomes an empty cell, or any text you choose.
Yes, any number of tuples per statement.
They're skipped.
No.
Statements are read by a small state-machine tokenizer rather than regular expressions, so commas, semicolons, parentheses and quotes inside string values never break a row. It recognizes INSERT [IGNORE] INTO with an optional column list, and both VALUES and VALUE with any number of row tuples. Identifiers can be quoted with backticks, double quotes or brackets. Strings handle doubled single quotes, backslash escapes, and the N'…' and E'…' prefixes. NULL becomes an empty cell or a text of your choice. Numbers and function calls such as NOW() are kept as written. Comments (--, # and /* */) and non-INSERT statements are skipped. The header comes from the first column list, or column_1… when there is none.