Conversor de SQL a CSV
Extrae los datos de sentencias SQL INSERT y expórtalos como CSV. Maneja cadenas entrecomilladas, comillas escapadas, NULL, números y llamadas a funciones anidadas, así que un volcado de base de datos se convierte en hoja de cálculo en segundos.
The reverse is the CSV to SQL Converter, and formatting the underlying statement is the job of the SQL Formatter & Beautifier. For the JSON equivalent of the same rows, the CSV to JSON Converter is the tool.
Cómo usar SQL a CSV
- 1 Paste the result set — the rows as text, or the insert statements.
- 2 Confirm the column names and the order.
- 3 Choose the delimiter and quoting rules.
- 4 Download the CSV.
Cómo usarlo
Pega SQL que contenga una o más sentencias INSERT. El analizador encuentra cada fila, deduce la lista de columnas de la sentencia y escribe un CSV con una fila de cabecera. Las filas de tablas distintas se etiquetan para que puedas distinguirlas.
- Varias sentencias INSERT en un solo pegado
- Cadenas entrecomilladas y escapes de comilla doble
- NULL, números, booleanos y funciones conservados
- Salida CSV o TSV con cabecera opcional
- Copia o descarga el resultado
Preguntas frecuentes
How do I get a result set into a pasteable form?
Most database clients can export results as CSV, tab-separated text or SQL inserts directly, and that is usually the better route than copying the grid. If you are copying from a grid, tabs are the more reliable separator because the client typically copies them, and a value containing a comma will not break the columns.
What happens to NULL in CSV?
It becomes an empty field, which is indistinguishable from an empty string. That ambiguity is inherent to CSV, and the distinction is lost the moment the data leaves the database. If it matters, a sentinel value or a separate marker column is needed.
Why do timestamps change format?
Because the client and the spreadsheet apply their own conventions. A database timestamp with a time zone may be rendered in local time on export and then reinterpreted by the spreadsheet as a date in the viewer's time zone, shifting it. For data that must be precise, export in a fixed format and import as text.
Herramientas para desarrolladores relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con SQL a CSV: