Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MYSQL - How would I Export tables specifying only certain fields?

How would I Export tables specifying only certain fields?

I am using mysql 5.0 - using either a sql command or mysqldump.

My table is X, and the fields I want to export are A,B,C

like image 214
Mike Curry Avatar asked Dec 12 '08 15:12

Mike Curry


People also ask

How do I export a specific table?

Open the MySQL database wizard & select the table you want to export. Right-click on the table name & select the table data export wizard option.

How do I export MySQL results to Excel?

Within MySQL for Excel, Open a MySQL Connection, click the employee schema, Next, select the location table, click Edit MySQL Data, then choose Import to import the data into a new Microsoft Excel worksheet for editing.

How can I output MySQL query results in CSV format?

Use the following command: ALTER TABLE myTable ENGINE=CSV; This statement changes the format of the database to CSV. You can then copy the CSV file to another system.


1 Answers

If you are using phpMyAdmin,

Run the query

SELECT A,B,C FROM X

and there is an export option in the bottom of the result.

like image 129
Dijo David Avatar answered Nov 15 '22 18:11

Dijo David