I know how to export multiple columns to a csv file. using:
SELECT `col1`, `col2`
FROM table
INTO OUTFILE 'C:/filename.csv'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n';
When I open the file using excel, everything is fine, each record is in a line. But, when I open it using notepad, I find all records are printed next to each other without line separator. How can I make the output of the query to be printed as one record per line and each column separated by comma ??