"MySQL" exports a table of MySQL to Excel

Source: Internet
Author: User

Exporting a MySQL table to Excel is not as difficult as "MySQL" Importing an Excel table into one of the MySQL tables (click to open the link).

Enter the following T-SQL statements directly:

SELECT * from a table into outfile ' file path '
For example, I want to export a i_student table of the test database below to 1.xls in the D packing directory:

Use test
After that, enter:

SELECT * from i_student to outfile ' D:/1.xls '

Such as:

Then you'll find a 1.xls in the D-disk waiting for you, of course, the following information may be prompted when opening:


Do not control it, direct election is, you can find the content of 1.xls, there is no header ID and name, but there is enough to query the content.


Similarly to any query content, only need to put the previous export statements, modify it.

"MySQL" exports a table of MySQL to Excel

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.