How to convert CSV to SQL

CSV is often used for storing and exchanging data. Sometimes you will want to load that data into a relational database using SQL. You can easily create the SQL commands using Easy Data Transform:

CSV to SQL

In the right pane add the SQL command in Substitution script, leaving gaps where the values from the columns in the CSV files will go. Then insert the column values into the text using the Insert variable drop-down list. Set New column name to ‘SQL’.

convert CSV to SQL

Click Evaluate when you are done. A new ‘SQL’ column is added at the end of the table.

convert CSV file to SQL

Set the table to Show all rows, click on the ‘SQL’ column to select it and copy it to the clipboard using Ctrl+C (Windows)/Cmd+C (Mac).

convert to SQL from CSV

You can now paste the SQL into wherever you need it.

If you have large number of files to convert you can do it using the batch processing feature.

Substitute is just one of the 46 transforms in Easy Data Transform you can use to quickly and easily create a wide range of data transformations. See our quick start guide for more details.

CSV to HTML converter

Try it free now!

Windows Logo Windows Download

v1.9.1 for Windows 10 / 8 / 7 (49 MB)

Apple Logo Mac Download

v1.9.1 for Mac 10.15 to 10.12 (23 MB)


Questions or problems?

Email support@easydatatransform.com


Do you have a question?
We would love to help.

This pop-up will not be shown again