To write the users table to /tmp/users.csv:
SELECT *
INTO OUTFILE '/tmp/users.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM users
Source: Export data to CSV from MySQL
To write the users table to /tmp/users.csv:
SELECT *
INTO OUTFILE '/tmp/users.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM users
Source: Export data to CSV from MySQL
Last modified: 20/12/2011 Tags: mysql
Other pages possibly of interest:
This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan