Question

I have a CSV file with 110 columns. Preparing a table with 110 columns manually will take me forever. Is there any other way to do it?

I tried to create a table , but I was wondering if there is any way that when I create a table in putty session, it takes the column names and number of columns by itself.

Was it helpful?

Solution

Before you jump the gun and just make one huge table, you should sit down and think about if having one massive table really is useful in the long run. Normalization can be a wonderful thing, and depending on the size of your input it would be much less of a hassle to structure everything now rather then later.

As far as deciding what to import, toss it into excel or mysql and drop the fields you don't want/need. Mysql will actually build the structure of your table from the csv file, as long as you give it the right delimiter (comma, semicolon, whatever seperates your fields).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top