MYSQL Data Import

I am trying to import a large csv file into MySQL. It's about 1.4 GB and consists of ~ 1MM rows and 100 columns.

My question is whether there is some way to generically dump the data into a db w/o having to manually define 100 columns.

I know in SQL Server there is a data importing tool that will read the first row of a csv file and figure out what the columns should be.

I have MySQL workbench but can't find a similar feature.

Any suggestions?


The answer is sadly No, there is no way (using the standard mysql utilities) to create a table by analyzing the data your .csv, and then insert the data into this new table.

You'll need to create the table yourself (either by hand, or preferably using some script).

Then you can import the rest of the data using one of the methods below:

Need Your Help

Sqlite syntax error near “?”

android android-sqlite

Simple enough; my code looks like this:

How can I run some machine code from within my program

c x86

How can I run some machine code from within my C program?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.