LoginSignup
2
2

More than 5 years have passed since last update.

MySQL CSV形式でデータ吐き出し

Posted at
mysql -u user_name -p db_name -e "SELECT * FROM table_name" | tr "\t" "," > "table_name.csv"
  • 列名不要時は -N 付加
  • -s オプションは合ってもなくても一緒?

参考
http://mysql.javarou.com/dat/000396.html
http://ameblo.jp/inclouds/entry-10575902477.html
http://iandeth.dyndns.org/mt/ian/archives/000119.html

2
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2