There are many ways to export MySQL data. One of them is the SELECT … INTO OUTFILE.
The SELECT … INTO OUTFILE is the complement of LOAD DATA INFILE.
It is used to create a simple delimited file and is intended to let you very quickly dump a table to a text file.
Type the following SQL at the mysql prompt:
SELECT * INTO OUTFILE ‘MyFileName.txt’
FIELDS TERMINATED BY ‘|’
LINES TERMINATED BY ‘\r\n’
FROM mytablename;
Of course, you must have the FILE privilege to create the file on the server host.
Be First To Comment
Related Post
Leave Your Comments Below