MysqlでSelectの結果をCSVにエクスポートする
Mar 10, 2015AD:
こんな感じで、SELECT分の後にINTO OUTFILEを追加してあげればOKです。
1 2 3 4 5 6 |
SELECT * FROM user WHERE status = 1 ORDER BY id ASC INTO OUTFILE '/tmp/status_user.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; |
AD:
No Comments, Comment or Ping
Reply to “MysqlでSelectの結果をCSVにエクスポートする”
Warning: Undefined variable $user_ID in /home/sazaeau/mizoshiri.com/public_html/blog.mizoshiri.com/wp-content/themes/grid_focus_public_mizo/comments.php on line 66
You must be logged in to post a comment.