MySQL Forums
Forum List  »  Other Migration

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

regards
--skonealone

Options: ReplyQuote


Subject
Views
Written By
Posted
182339
January 12, 2005 03:34PM
108706
January 26, 2005 09:25PM
60267
February 06, 2005 09:15AM
Re: Export to CSV
64534
April 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.