Mega Code Archive

 
Categories / MySQL Tutorial / MySQL Utilities
 

Exporting Data

The command to export data to a text file is similar to the standard SELECT command. MySQL creates a 'tab delimited' file by default. SELECT <columns> FROM <table_name> INTO OUTFILE <file_name> SELECT employee.id, employee.first_name, employee.last_name, employee.start_date, employee.salary, employee.city FROM employee INTO OUTFILE 'c:\\employee.txt';