CodeKingPlusPlus
CodeKingPlusPlus

Reputation: 16081

MySQL into outfile formatting

select * 
  INTO OUTFILE 'outfile.txt'
  FIELDS TERMINATED by ','
  LINES TERMINATED BY '\n'
  from nGrams

Is there any way I can modify this query to return each row on one line?

Upvotes: 1

Views: 1569

Answers (1)

Eric Petroelje
Eric Petroelje

Reputation: 60498

Seems like thats exactly what it would do already.

However, if you are doing this on Windows, you might want to use LINES TERMINATED BY '\r\n' or some crappy text editors (e.g. notepad) might not see \n by itself as a line break

Upvotes: 3

Related Questions