a11y.skipToMainContent
1

CSV 到 SQL INSERT 语句

粘贴 CSV 并获取 MySQL, PostgreSQL, SQLite 或 MS SQL 的 SQSERT 语句——可选使用 CREATE Table 序言(列类型取自数据). 多值INSERT模式将一切崩溃成一个语句.

More options
Was this tool helpful?
Send output to:
Advertisement

How to use CSV to SQL

  1. 粘贴你的CSV.
  2. 设置表格名称和方言.
  3. 可选启用CREATE表.
  4. 点击生成 SQL .

{姓名}是什么来着?

每个单元格值被适当引用 – 数字不引出, NULL 处理,布尔识别 。 逃避识别符遵循所选择的方言(MySQL背文,Postgres双引文,MSSQL括号).

Advertisement

FAQ

如何推断列类型?
单柱螺旋:全整型-INTEGER,全数-DECIMAL,全能-BOOLEAN,短弦-VARCHAR(255),更长-TEXT.
它如何处理数值内的逗号,引号,和新行?
分解器遵循了RFC 4180 CSV规则——包含逗号或新行的字段被双引号所包裹,而内引号则被双取而出.
我能设定桌子和计划名称吗?
是的,在生成前您可以编辑表格名称字段 。 输出使用您在可选 CREATE Table 和所有INSERT 语句中提供的名称 .

Related tools

Author

SC
Sarah Chen"The Data Whisperer"

Data Analyst & CSV Specialist

Sarah has spent more than a decade wrangling spreadsheets, debugging CSV exports, and teaching teams how to make data work for them. She previously led data-quality initiatives at a fintech unicorn, where she reduced reporting errors by 40 percent through automated validation pipelines. When she is not optimizing queries or writing about data tooling, you will find her mentoring junior analysts at local bootcamps and speaking at data literacy meetups.

← Back to CSV Tools · All tags

Last updated:

Advertisement