Skip to main content

Privacy First

CSV to SQL UPDATE

Generate SQL UPDATEs from CSV

Build UPDATE statements row by row from CSV for PostgreSQL, MySQL/MariaDB, or Microsoft SQL Server. Select one or more key columns for the WHERE clause, choose which fields to update, and review the output before running. Composite keys are supported.

Example output

UPDATE customers
SET "email" = 'ada@example.com',
    "status" = 'active'
WHERE "customer_id" = 123;
Your file is processed locally in your browser and is never uploaded to WebF1.

Import CSV

Drag and drop a CSV file here, or

Paste CSV text instead

Validation

  • At least one key column is required for SQL UPDATE.

Review before running

Generated SQL can modify or overwrite data. Review all output, test in a non-production environment, and make a backup before running it.CSV Data Handyman does not execute SQL or connect to any database.

Frequently asked questions

Why must I select a key column?
UPDATE statements without a WHERE clause update every row. CSV Data Handyman refuses to generate an UPDATE without at least one user-selected key column, so every statement has an explicit WHERE condition. This rule is enforced for every dialect.
Which SQL dialects are supported?
PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server. Pick the dialect in the output settings; identifiers and values are quoted and escaped appropriately for each.
Can I use a composite key?
Yes. Select multiple key columns. They are combined in the WHERE clause with AND.
Which columns are updated?
Every mapped, included column that is not also a key column appears in the SET clause. Key columns never appear in SET.
What should I do before running the generated SQL?
Review every statement, test in a non-production environment, and make a backup. Generated SQL can modify or overwrite data. CSV Data Handyman does not execute SQL or connect to any database.

Related tools

  • CSV to JSON

    Convert CSV rows to a JSON array with renamed and nested fields.

  • CSV to XML

    Convert CSV rows to XML with configurable root and row elements.

  • CSV to SQL INSERT

    Generate INSERT statements from CSV rows for PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server.

  • CSV to SQL UPSERT

    Generate upsert statements (ON CONFLICT, ON DUPLICATE KEY, or MERGE) for PostgreSQL, MySQL/MariaDB, and Microsoft SQL Server.

  • CSV Column Mapper

    Rename, reorder, transform, and map CSV columns for export.