开发者

MySQL LOAD DATA INFILE unknown number of columns

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜