CSV에서 SQL INSERT로
CSV 데이터로부터 SQL INSERT 문을 생성합니다. CSV 내보내기 파일을 데이터베이스로 가져올 때 유용합니다.
INSERT INTO my_table (name, value) VALUES ('A', '1');
INSERT INTO my_table (name, value) VALUES ('B', '2');이 도구 사용 방법
- 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.
CSV에서 SQL INSERT란 무엇인가요?
CSV를 데이터베이스로 대량 가져오기 하려면 보통 INSERT 문이 필요합니다. 이 생성기는 MySQL, PostgreSQL, SQLite 및 대부분의 다른 DBMS에서 작동하는 표준 SQL INSERT 문을 생성합니다. 매우 큰 CSV(10,000행 이상)의 경우에는 데이터베이스의 기본 유틸리티(LOAD DATA / COPY FROM)를 사용하는 것이 좋습니다. 이는 자릿수가 다를 정도로 훨씬 빠릅니다.
일반적인 사용 사례
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.
자주 묻는 질문
값에 포함된 특수 문자를 처리하나요?▼
NULL 값은 어떻게 처리하나요?▼
관련 도구
JSON to CSV 변환기
객체로 이루어진 JSON 배열을 CSV 형식으로 변환합니다. API 데이터를 스프레드시트로 내보내기에 완벽합니다.
CSV에서 JSON으로 변환기
CSV 데이터를 객체로 이루어진 JSON 배열로 변환합니다. 첫 번째 행은 헤더로 처리됩니다.
2진수에서 16진수 변환기
2진수를 16진수로 변환합니다. 같은 값에 대해 16진수는 2진수보다 4배 더 간결합니다.
16진수에서 2진수로 변환기
16진수를 2진수로 변환합니다. 각 16진수 자릿수는 정확히 4자리의 2진수로 확장됩니다.
10진수에서 2진수 변환기
10진수를 2진수, 16진수, 8진수로 모든 진법을 한 번에 변환합니다.
ASCII에서 16진수 변환기
텍스트를 ASCII 16진수 코드로, 그리고 그 반대로 변환합니다. 각 문자는 2자리 16진수 값으로 변환됩니다.