From: walter harms Date: October 29 2009 5:39pm Subject: Re: Choose certain columns in mysqldump? List-Archive: http://lists.mysql.com/mysql/219188 Message-Id: <4AE9D34F.5070505@bfs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jaime Crespo Rincón schrieb: > 2009/10/29 Michael Dykman : >> mysqldump is not really a data manipulation tool.. as the name >> implies, it is a dumper. >> >> What you are trying to accomlish can be done rather elegantly via the >> SELECT .. INTO OUTFILE syntax >> >> http://dev.mysql.com/doc/refman/5.1/en/select.html >> >> and then loaded into your new structure via LOAD INFILE >> >> http://dev.mysql.com/doc/refman/5.1/en/load-data.html > > Yes, in fact, you can still do it from the command line with mysql > command line client: > > mysql -urxxxt -pxxx db_name -e "SELECT [any, column, you, want] INTO > OUTFILE '/var/www/folder/table_name.txt' FROM table_name WHERE [any, > filter, you, want] ORDER BY [any, order, you, want]" > > I prefer mysql -BAN .... It has the advantage that you do not need to fiddle with headers etc. re, wh