LoginSignup
1
1

More than 5 years have passed since last update.

sqlite3でCSVへエクスポート

Posted at

目的

SQLite3のデータをCSVで出力したい

方法

  1. .mode csv
  2. .output example.csv
  3. select * from example

補足

.output exmaple.csvをしてしまうとそれ以降の出力がCSVファイルへの書き込みになってしまう。実は.showで見るとわかるようにファイルに書き込む前はoutput stdoutになっている。

よって.output stdoutで元に戻る

1
1
0

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
1
1