0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SQLLite3で使うコマンドメモ

Last updated at Posted at 2017-09-28

忘れがちなので自分用にメモ

SQLLite起動コマンド
sqlite3 db/development.sqlite3

テーブルのカラムを確認
PRAGMA TABLE_INFO(テーブル名);

$ sqlite3 db/development.sqlite3
	SQLite version 3.8.2 2013-12-06 14:53:30
	Enter ".help" for instructions
	Enter SQL statements terminated with a ";"
sqlite> PRAGMA TABLE_INFO(reviews);
	0|id|INTEGER|1||1
	1|book_id|integer|0||0
	2|body|text|0||0
	3|created_at|datetime|1||0
	4|updated_at|datetime|1||0
sqlite> 

SQLLite停止コマンド
.exit

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?