CSV zu SQL INSERT
Generieren Sie SQL-INSERT-Anweisungen aus CSV-Daten. Nützlich, um CSV-Exporte in Datenbanken zu importieren.
INSERT INTO my_table (name, value) VALUES ('A', '1');
INSERT INTO my_table (name, value) VALUES ('B', '2');So verwenden Sie dieses Tool
- 1
Type the destination table name into the top field (it is dropped into the generated INSERT exactly as typed).
- 2
Paste your CSV into the text box, keeping the header row first so its names become the column list.
- 3
Read the INSERT statements that appear below as you type, with one statement per data row.
- 4
Select the generated SQL and copy it into your database client or migration script to run it.
Was ist CSV zu SQL INSERT?
Der Massenimport von CSV in eine Datenbank erfordert in der Regel INSERT-Anweisungen. Dieser Generator erzeugt Standard-SQL-INSERT-Anweisungen, die in MySQL, PostgreSQL, SQLite und den meisten anderen DBMS funktionieren. Für sehr große CSV-Dateien (mehr als 10.000 Zeilen) ist das native Dienstprogramm Ihrer Datenbank (LOAD DATA / COPY FROM) vorzuziehen: Es ist um Größenordnungen schneller.
Häufige Anwendungsfälle
Seeding a few rows of test or fixture data into a local development database without writing the INSERTs by hand.
Converting a small spreadsheet export of lookup values (statuses, categories, country codes) into a migration script.
Drafting INSERT statements for a quick demo or tutorial where the data is short and contains no commas inside fields.
Reshaping a handful of rows copied from a CSV file into SQL you can paste into a query console.
Generating a starting point for a data-load script that you will then hand-edit to add NULLs or fix column types.
Teaching or learning SQL INSERT syntax by watching how column lists and quoted values are assembled from rows.
Häufig gestellte Fragen
Werden Sonderzeichen in den Werten behandelt?▼
Und was ist mit NULL-Werten?▼
Verwandte Tools
JSON-zu-CSV-Konverter
Konvertieren Sie ein JSON-Array von Objekten in das CSV-Format. Perfekt zum Exportieren von API-Daten in Tabellenkalkulationen.
CSV-zu-JSON-Konverter
Konvertieren Sie CSV-Daten in ein JSON-Array von Objekten. Die erste Zeile wird als Kopfzeile behandelt.
Binär-zu-Hexadezimal-Konverter
Wandeln Sie Binärzahlen in Hexadezimal um. Hexadezimal ist für denselben Wert viermal kompakter als Binär.
Hexadezimal-zu-Binär-Konverter
Wandeln Sie Hexadezimalzahlen in Binärzahlen um. Jede Hexadezimalziffer wird in genau 4 Binärziffern erweitert.
Dezimal-zu-Binär-Konverter
Konvertieren Sie Dezimalzahlen in Binär, Hexadezimal und Oktal – alle Basen auf einmal.
ASCII-zu-Hexadezimal-Konverter
Wandeln Sie Text in ASCII-Hexadezimalcodes um und zurück. Jedes Zeichen wird in seinen zweistelligen Hexadezimalwert umgewandelt.