我正在尝试将大型数据集上传到MySQL。问题是这一切都混乱了
答案 0 :(得分:0)
它是这样的:
LOAD DATA [LOCAL] INFILE 'nom_fichier'
INTO TABLE nom_table
[FIELDS
[TERMINATED BY '\t']
[ENCLOSED BY '']
[ESCAPED BY '\\' ]
]
[LINES
[STARTING BY '']
[TERMINATED BY '\n']
]
对于你的例子:
LOAD DATA [LOCAL] INFILE 'YourFile'
INTO TABLE TableName
[FIELDS
[TERMINATED BY '\t']
[ENCLOSED BY '']
[ESCAPED BY '\\' ]//We don't need it here...
]
[LINES
[STARTING BY '']
[TERMINATED BY '\n']
]
请在此处查看:http://dev.mysql.com/doc/refman/5.1/en/load-data.html