久しぶりにrails関連の仕事があったので、SQliteで使ったコマンドをまとめてみました
ちなみにrailsでは
1 | $ rails db |
のコマンドで入れるようです
1 2 3 4 5 6 7 8 | # テーブル一覧の表示 sqlite> .tables # テーブルのカラムを表示 .schema tablename # テーブルのデータ一覧 SELECT * FROM tablename; |
参考にした記事
How to list the tables in an SQLite database file that was opened with ATTACH?