您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Mysql导入csv文件_MySQL

2026/1/29 20:19:37发布20次查看
bitscn.com
mysql导入csv文件
mysql load data infile命令可以把csv平面文件中的数据导入到数据库中。
linux下:
load data infile '/home/test/dump/ip_location.csv' into table ip_location character set utf8 fields terminated by ',' enclosed by '';--character set :mysql字符集,一定要加上,免去乱码麻烦--into table :导入到哪个表--fields terminated by :以什么作为分割符-- enclosed by :被什么包围
windows:
load data infile d:/insert_data.csv replace into table demo character set gb2312 fields terminated by , enclosed by lines terminated by /r/n;--lines terminated by:这个与linux不同,以什么作为一行的结尾。
bitscn.com
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product