MySQL dump specific columns

I thought that I had to dump specific columns from a table. In the end I needed to parse the resulting XML with a script anyway to convert it to CSV, but here is a reminder for myself (and maybe you):

mysql -u <user> -p <database> --execute="SELECT * FROM sometable" -X > out.xml
Published on Jan. 21, 2013 at 5:11 p.m. by Nicolas and tagged MySQL. You can follow the discussion with the comment feed for this post. Feeling generous? Donate!


Start a new thread

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.