Reputation: 181
Is there any way to export database records as CSV file from Mysql Workbench by using command line syntax?
Upvotes: 0
Views: 164
Reputation: 53532
MySQL Workbench comes with a table data export function, which supports csv and json formats. You can start it from the context menu in the schema tree:
The simple wizard then allows you to select the output data type:
Similarly, there's the table data import wizard that can read csv and json data.
Upvotes: 0
Reputation: 722
SELECT orderNumber, status, orderDate, requiredDate, comments
FROM orders
WHERE status = 'Cancelled'
INTO OUTFILE 'C:/tmp/cancelled_orders.csv'
FIELDS ENCLOSED BY '"' TERMINATED BY ';' ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
more information here:
http://www.mysqltutorial.org/mysql-export-table-to-csv/
Upvotes: 1