is it possible to export into a csv file only some fields from a database table in mysql? i have a table with 8 fields but i want to export only 4 fields from that table.
thanks.
Yes you have to use the 'SELECT INTO OUTFILE' command
can you give me an example of that commad? thanks 🙂
SELECT row1, row2, row4, row5 INTO OUTFILE '/tmp/result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM your_table;