Excel data import MySQL

Source: Internet
Author: User

    1. Today, the development of a requirement, you need to import the data in Excel into MySQL, originally wanted to import Excel into CSV format automatically has a comma, so with a comma as a delimiter, and then copy the data to a text file using MySQL load is possible, who knows not what I think.

    2. Here's a look at the data form of Excel, the fourth field has a comma, I'm going to go, how to do this:


200005 Gold War boots
The boots of pure gold are expensive and can be used to improve other anti-armor experience 6 1 3 0
200006 Golden Sword
The sword made of pure gold is expensive and can be used to improve the experience of other weapons. 5 2 3 0 1



3. Finally, many tests were adopted to solve this problem:

First copy the file directly into the TXT file, then use the command in MySQL

Load data local infile "/tmp/test.txt" into table test_goods fields TERMINATED by ' \ t ';










This article from "Yaoshenshen" blog, declined reprint!

Excel data import MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.