MySQLでCSV出力をおこなう

提出用に整形するのにたまに使う

select name, email from users 
 into outfile '/tmp/user.csv' fields terminated by ',' optionally enclosed by '"';