20140218 mysql query to csv - plembo/onemoretech GitHub Wiki
title: MySQL query to csv link: https://onemoretech.wordpress.com/2014/02/18/mysql-query-to-csv/ author: phil2nc description: post_id: 7029 created: 2014/02/18 11:38:02 created_gmt: 2014/02/18 16:38:02 comment_status: closed post_name: mysql-query-to-csv status: publish post_type: post
MySQL query to csv
Outputting MySQL query results to csv is easy. SQL syntax is like this:
MySQL [weblogs]> select blog_id, domain,path, last_updated
-> from wp_blogs
-> into OUTFILE '/tmp/blogs-list.csv'
-> fields terminated by ','
-> enclosed by '"'
-> lines terminated by '\n';
Copyright 2004-2019 Phil Lembo