i want to import csv file into mysql.. something like:
load data local infile 'uniq.csv' into table tblUniq
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(uniqName, uniqCity, uniqComments)
http://www.tech-recipes.com/rx/2345/import_csv_file_directly_into_mysql/
but column names in csv and that in database table are different what should i do?
i want to do it programmatically..
You can create a script to parse your csv file and to put the data into db.
Something like: