MySQL导入csv

导入csv文件

使用如下命令:
mysql> load data infile "your csv file path" into table [tablename] fields terminated by ','
注意上面导入文件时,都需要提前建立好与文件内各个段对应好的数据表。并且文件的路径需要使用引号括起来,双引号和单引号都可以。

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>