53
54

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.

railsで作ったDBの中身を確認する

Last updated at Posted at 2018-04-15

ターミナルで

terminal
rails dbconsole

と打つと、

terminal
sqlite>

となるので、

terminal
sqlite>.headers on

として、カラム名の表示をONにして、SQL文を打つと見られる。

terminal
sqlite> select * from users;
id|name|email|created_at|updated_at
1|Kohei!!|kishimotogmail@gmail.com|2018-04-15 15:45:22.055691|2018-04-15 15:45:45.757233

exitでターミナル終了

terminai
sqlite> exit
53
54
2

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
53
54

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?