Skip to main content
DevTools24

CSV 转 SQL 转换器

将 CSV 数据转换为 SQL 语句。生成 CREATE TABLE 和 INSERT 语句,自动检测类型。

Type Detection

  • Column types are automatically inferred from data values
  • Dates (YYYY-MM-DD) and timestamps are detected
  • Boolean values: true/false, 1/0, yes/no
  • Empty values and "NULL" are converted to NULL

CSV to SQL Conversion - 技术详情

Converting CSV to SQL is useful for importing spreadsheet data into databases. This tool automatically detects column types (integer, decimal, boolean, date, string) and generates properly escaped SQL statements.

命令行替代方案

# Import CSV directly in PostgreSQL\n\\copy my_table FROM 'data.csv' WITH CSV HEADER;\n\n# MySQL\nLOAD DATA INFILE 'data.csv' INTO TABLE my_table\nFIELDS TERMINATED BY ',';