I am very confused about LOAD DATA INFILE
after searching SO and google I have found no help on what I am attempting to do. I want to create a new table, and load the contents of a csv file. The csv files first row is the column names I w开发者_StackOverflowant.
Or if that cannot be done, how can I load the file without knowing how many columns exist?
LOAD DATA INFILE 'file.txt'
INTO TABLE t1
(... unknown number of columns ...);
You're going to need a tool other than mysql to load csvs without a predetermined schema.
精彩评论