How does mysql export data of a field in a table?

Source: Internet
Author: User

When exporting data in a database, how do we export data from a table without exporting all the data in the table? The following example shows how to perform this operation.

Assume that a data table (news) has three fields: id, title, and content. Now you only need to export the content of the content field. You can run the following two commands to complete this task.

Select 'content' from 'News' into outfile "d:/news. SQL ";

Or:

Load data infile 'd:/news. SQL 'into TABLE 'News' ('content ');
Articles you may be interested in
  • How to query data of mysql today, yesterday, last 7 days, last 30 days, last month, and last month
  • Mysql Server master-slave Database Synchronization Configuration
  • MySQL Data Table for Chinese provinces and municipalities
  • In php, we use the curl post method to submit data and the get method to obtain webpage data.
  • Improves the query speed of millions of data records for MySQL
  • How to check MySQL startup time and running time
  • Windows cannot start the hardware device because its configuration information (in the Registry) is incomplete or damaged. (Code 19) Solution
  • Navicat for mysql remote connection to the mySql database prompt 10061,1045 error Solution

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.