自分用めも。
文法。
1 | select * from [DB名].[テーブル名] into outfile "/path/to/output/fileName.csv" fields terminated by ',' enclosed by '"' lines terminated by '\r\n'; |
例。
1 | select * from mysql.help_topic into outfile "/home/admin/output.csv" fields terminated by ',' enclosed by '"' lines terminated by '\r\n'; |
一発で生成可能。さすがMySQL。めっちゃ便利。