DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Dump Mysql Data Into A Local Test File

11.20.2007
| 4124 views |
  • submit to reddit
        // SQL to dump MySql data into a local cvs file

SELECT * INTO OUTFILE '/tmp/file.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM <tablename>