MySQL Forums :: Other Migration :: Export to CSV

Advanced Search

Re: Export to CSV
Posted by: Chandrashekhar Koli ()
Date: April 12, 2008 12:53AM

You can user command line tool to export the table from MySql database into CSV file. Here is the command :

mysql -umysqlusername -pmysqlpass databsename -B -e "select * from \`tabalename\`;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > mysql_exported_table.csv

i hope this will help you


Options: ReplyQuote

Subject Views Written By Posted
Export to CSV 180900 Bill Quinn 01/12/2005 03:34PM
Re: Export to CSV 106718 Mike Hillyer 01/26/2005 09:25PM
Re: Export to CSV 59560 Alex Rao 02/06/2005 09:15AM
Re: Export to CSV 61291 Chandrashekhar Koli 04/12/2008 12:53AM

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.