CSV naar SQL INSERT
Genereer SQL INSERT-instructies op basis van CSV-gegevens. Handig voor het importeren van CSV-exports in databases.
INSERT INTO my_table (name, value) VALUES ('A', '1');
INSERT INTO my_table (name, value) VALUES ('B', '2');Hoe u deze tool gebruikt
- 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.
Wat is CSV naar SQL INSERT?
Het in bulk importeren van CSV naar een database vereist meestal INSERT-instructies. Deze generator produceert standaard-SQL INSERT-instructies die werken in MySQL, PostgreSQL, SQLite en vrijwel alle andere DBMS'en. Voor zeer grote CSV-bestanden (meer dan 10.000 rijen) verdient het de voorkeur om de native hulpprogramma's van uw database te gebruiken (LOAD DATA / COPY FROM): die zijn ordes van grootte sneller.
Veelvoorkomende toepassingen
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.
Veelgestelde vragen
Verwerkt de tool speciale tekens in de waarden?▼
En NULL-waarden?▼
Gerelateerde tools
JSON-naar-CSV-converter
Zet een JSON-array van objecten om naar CSV-formaat. Perfect voor het exporteren van API-gegevens naar spreadsheets.
CSV-naar-JSON-converter
Zet CSV-gegevens om in een JSON-array van objecten. De eerste rij wordt behandeld als koptekst.
Binair-naar-hexadecimaal-converter
Zet binaire getallen om naar hexadecimaal. Hexadecimaal is voor dezelfde waarde 4 keer compacter dan binair.
Hexadecimaal-naar-binair-converter
Zet hexadecimale getallen om naar binair. Elk hexadecimaal cijfer wordt precies uitgebreid tot 4 binaire cijfers.
Decimaal-naar-binair-converter
Converteer decimale getallen naar binair, hexadecimaal en octaal, alle talstelsels tegelijk.
ASCII-naar-hexadecimaal-converter
Zet tekst om naar hexadecimale ASCII-codes en omgekeerd. Elk teken wordt omgezet in zijn hexadecimale waarde van 2 cijfers.