Home >Backend Development >PHP Tutorial >How to batch import multiple excel files in MYSQL, the fields are all corresponding

How to batch import multiple excel files in MYSQL, the fields are all corresponding

WBOY
WBOYOriginal
2016-09-21 14:12:531938browse

How to batch import multiple excel files in MYSQL, the fields are all corresponding

Reply content:

How to batch import multiple excel files in MYSQL, the fields are all corresponding

navicat

navicat seems to have this function.

Or you can convert excel to csv first, and then use the following sql to import the data

<code class="sql">#从文件导入至数据表
LOAD DATA LOCAL INFILE 'c:/test.csv' INTO TABLE test
FIELDS 
  TERMINATED BY ',' 
  ENCLOSED BY "'" 
  ESCAPED BY "'"
LINES 
  TERMINATED BY '\r\n'
IGNORE 1 LINES;</code>

Reference: http://dev.mysql.com/doc/refm...

Statement:
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