MySQL Forums
Forum List  »  Newbie

Re: export query results to csv file
Posted by: Paul McArdle
Date: August 01, 2005 04:28AM

the following will give you tab seperated.
close, but no coconut.
mysql -uuser -ppassword -hhost dbname -e"select * from words;" > outfile
cat outfile
id name logged
1 1 2005-07-24
2 1a 2004-12-01
3 2b 2005-07-24
4 2a 2004-02-21
5 2 2002-11-07
6 1.1 2001-11-17
7 1.1a 2001-03-17
8 1.2b 2004-01-17
9 1.2a 2005-06-26
10 1.2 2005-07-22

Options: ReplyQuote


Subject
Written By
Posted
Re: export query results to csv file
August 01, 2005 04:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.