CSV to SQL Converter
Instantly convert CSV data to SQL INSERT/UPDATE statements
in your browser securely and for free.
테이블 설정
옵션
입력 CSV
출력 SQL
CSV를 SQL로 변환기 정보
개발자들이 CSV 파일로부터 SQL의 INSERT 또는 UPDATE 구문을 순식간에 생성할 수 있도록 도와주는 무료 도구입니다. 데이터베이스 데이터 마이그레이션 시 수동 작업과 오류를 줄여줍니다.
변환 과정은 100% 사용자의 브라우저 내에서 진행됩니다. 민감한 정보가 포함된 CSV 파일도 외부로 유출될 염려 없이 안전하게 SQL을 생성할 수 있습니다.
CSV를 SQL로 변환하는 방법
설정 입력
테이블 이름과 생성할 SQL 유형 (INSERT 또는 UPDATE)을 선택하고, 옵션을 설정합니다.
CSV 데이터 준비
텍스트 영역에 CSV 데이터를 직접 붙여넣거나 파일을 로드합니다. 첫 행이 열 이름인 경우 해당 옵션을 체크합니다.
SQL 생성 및 복사
'SQL 생성' 버튼을 클릭하면 즉시 결과가 출력됩니다. 결과를 복사하여 데이터베이스에서 실행하세요.
SQL 및 데이터베이스 용어집
- CSV (Comma-Separated Values)
- 값을 쉼표로 구분하는 간단한 텍스트 파일 형식으로, 엑셀 등의 스프레드시트와 호환성이 높습니다.
- SQL (Structured Query Language)
- 관계형 데이터베이스 시스템에서 데이터를 정의하고 조작하는 표준 프로그래밍 언어입니다.
- INSERT 문
- 데이터베이스 테이블에 새 행(레코드)을 추가하는 데 사용되는 SQL 명령입니다.
- UPDATE 문
- 데이터베이스의 기존 레코드를 수정하는 데 사용되는 SQL 명령으로, 일반적으로 WHERE 절과 함께 쓰입니다.
- 이스케이프(Escaping)
- SQL 문법에서 특별한 의미를 갖는 문자(예: 작은따옴표)를 단순한 문자열로 처리하도록 만드는 과정입니다.
자주 묻는 질문
- Q.Is the CSV data I enter saved on external servers?
- No, all input data is processed strictly within your PC or smartphone's browser. There is no transmission or storage of data to external servers, making it completely safe to use even with CSV files containing customer lists or sensitive information.
- Q.Can it convert huge CSV files with tens of thousands of rows?
- Yes, it can, but it depends on your browser's memory and processing power. Processing a few thousand to tens of thousands of rows usually completes in seconds. However, for extremely large files exceeding 100,000 rows, we recommend splitting the file before conversion to prevent browser freezing.
- Q.How are numeric and string data distinguished?
- The tool automatically analyzes the value of each cell internally. If it consists only of numbers (or numbers with a decimal point), it is treated as a number and quotes are removed. This automatic inference can also be disabled in the options, allowing you to force all values to be quoted as strings if required.
- Q.How are NULL values or empty cells handled?
- Empty cells or the string 'NULL' are output to SQL as `NULL` without quotes so that they are treated as official NULLs in the database. If you intentionally want them registered as empty strings (`''`), please adjust the CSV data beforehand or manually tweak the generated SQL.
- Q.Can I use the output with both MySQL and PostgreSQL?
- Yes, the basic INSERT and UPDATE statements are generated using standard SQL syntax, so you can use them directly in major relational databases like MySQL, PostgreSQL, SQLite, and SQL Server. If specific functions or dialects are required, please replace them in the output SQL using a text editor.
사용 사례
초기 데이터 주입
시스템 개발 중 엑셀에서 작성된 초기 데이터나 테스트 데이터를 로드할 때 INSERT 구문을 쉽게 생성합니다.
대량 데이터 업데이트
빈번하게 업데이트되는 데이터를 반영하여 기존 테이블을 덮어쓰기 위한 UPDATE 구문을 만듭니다.
데이터 마이그레이션
이전 시스템에서 추출한 CSV 파일을 새로운 시스템에 맞게 SQL로 변환하여 안전하게 마이그레이션합니다.
데이터 복구 패치 생성
장애 발생 시 손상된 데이터를 복구하기 위한 SQL 패치를 빠르고 정확하게 생성하는 데 유용합니다.
피드백 보내기
도구를 개선하는 데 도움이 되도록 의견을 알려주세요.
Feedback is temporarily suspended
The server is busy or spam protection is active. Please try again later.