MySQL

概要 [#l5fc5acc]

SQLにてCSVファイルに書き出す方法です。

内容 [#k9f98819]

 # mysql> SELECT * INTO OUTFILE'保存先パス' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '' LINES STARTING BY '' TERMINATED BY '\r\n' FROM 対象テーブル;

参考URL:http://www.softel.co.jp/blogs/tech/archives/1286