Convert CSV to SQL

Separator

Input

Convert

Output

Instruction

This converter converts .csv files with "," or ";" -separator to a part of SQL query next format:

(column1, column2, ..., columnk) VALUES
(value1, value2, ..., valuek),
(value1, value2, ..., valuek),
(value1, value2, ..., valuek),
...
So input data should have next format:
column1,column2,...,columnk
value1,value2,...,valuek
value1,value2,...,valuek
value1,value2,...,valuek
...
or:
column1;column2;...;columnk
value1;value2;...;valuek
value1;value2;...;valuek
value1;value2;...;valuek
...
The main advantage of this script is that it gives you ready sql query part to load it to db. It is simple:
"INSERT INTO table" + csv_to_sql(input, separator)
Also this script can convert values, which are contains ",".
To add this feature to your project simply copy csv_to_sql function from JS block.



The online conversion of CSV (Comma Separated Values) data into SQL (Structured Query Language) queries for database inserts is the purpose of the CSV to SQL Converter. Custom CSV column delimiters, custom table names, and a number of MySQL insert commands are all supported by this amazing tool.


CSV to SQL
Convert CSV to SQL



Convert CSV to SQL


Query in SQL to create a table. However, this is only one illustration of "create table"; In fact, this query should not be run because it does not contain valid types, keys, or indexes.
Replace or insert queries.


Simply select the options you need, paste your CSV data into the textarea above, and click "Convert" to get SQL queries right away.

 that of moving the contents from the input CSV container to a new SQL file after extracting them. To put it another way, all you need to do is select the input CSV file and select the option to export it in database format. The "CREATE TABLE" and "INSERT INTO" statements will be made for you by the software.

Both small and large files larger than one gigabyte can be converted. All of this conversion takes place offline. Your personal data is only under your control. In any case, no CSV or SQL file is sent to the internet.

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !