Bug #4058 mysql --csv
Submitted: 8 Jun 2004 14:31 Modified: 4 Oct 2005 17:01
Reporter: Nicolas VÉRITÉ Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:any OS:Any (any)
Assigned to: CPU Architecture:Any

[8 Jun 2004 14:31] Nicolas VÉRITÉ
Description:
mysql --html and --xml are available. It would be nice to have a --csv for the CSV format (Comma Separated Values) which is usable in any spreadsheet program and is much more interoperable. Be careful of commas in text fields.

How to repeat:
To avoid text fields with commas being interpreted as as many different columns :
select col1, ',', col2, ',', replace (text_col, ',', ' ') from anytable;
[22 Sep 2004 22:23] Witold Baryluk
see bug #5707
[4 Oct 2005 17:01] Hartmut Holzgraefe
This is already there, although not necessarily obvious:

mysqldump -T --fields-terminated-by=; ...