Home > Database > Mysql Tutorial > phpMyAdmin下将Excel中的数据导入MySql的图文方法_MySQL

phpMyAdmin下将Excel中的数据导入MySql的图文方法_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:20:18
Original
826 people have browsed it

phpmyadmin

bitsCN.com

一开始导入失败了。

生成的SQL语句不正确。

SQL 查询:

INSERT INTO `cc_present`.`c_city` (`A`, `B`, `C`) VALUES (NULL, 1, '市辖区')...

像这样列名称变为A,B,C了。

问题出在两个地方。

1.需要在Excel文件中加入列名称

  另外注意Excel的Sheet名应该为表的名称,像下面这样。

phpMyAdmin下将Excel中的数据导入MySql的图文方法_MySQL

2.需要勾选忽略首行选项

phpMyAdmin下将Excel中的数据导入MySql的图文方法_MySQL

当然表名和字段名要和mySQL的定义一致,同时数据的类型和长度要没有问题,才能导入成功。  

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template