将多个CSV文件导入mysql [英] Import multiple CSV files into mysql

查看:153
本文介绍了将多个CSV文件导入mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我大约有28个csv文件,我需要将其作为28个表导入数据库. 我尝试了很多事情,但找不到方法.

I have about 28 csv files and I need to import this into database as 28 tables. I tried many things but just couldn't find a way.

推荐答案

您可以直接将MYSQL链接到它,并使用以下SQL语法上传信息.

You can link MYSQL directly to it and upload the information using the following SQL syntax.

load data local infile 'uniq.csv' into table tblUniq
fields terminated by ','
enclosed by '"'
lines terminated by '\n'

在此处了解更多信息:加载数据文件

Read more here : LOAD DATA INFILE

直接将CSV文件导入MySQL

这篇关于将多个CSV文件导入mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆