开发者

MySQL LOAD DATA INFILE unknown number of columns

开发者 https://www.devze.com 2023-03-26 12:17 出处:网络
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 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

精彩评论

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