2
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 3 years have passed since last update.

SQLiteのテーブル参照方法

Posted at

SQLiteに作成したテーブルの確認方法

VSCode拡張機能「SQLite」を使用してモデルから作成されたテーブルを参照する。

1.拡張機能をインストール

sqlite.png

2.コードウィンドウに移動し、「Ctrl + Command + P」を実行してInputBoxを開き、「sqlite」と入力する。

3.表示されたリストから、「Open Database」を選択する。

スクリーンショット 2020-11-25 22.34.00.png

4.表示されたdatabaseの候補から、参照したいデータベースファイル(今回はdata.sqlite)を選択する。

スクリーンショット 2020-11-25 22.34.16.png

5.サイドバー下部に「SQLITE EXPLORER」というタブが表示されているのを確認し、選択する。

6.選択可能となっているデータベースを選択し、表示されるテーブルリストから参照したいテーブルをクリックする。

7.SQLiteタブが表示され、テーブルの内容が表示される。スクリーンショット 2020-11-25 22.41.07.png

8.テーブルの参照内容を変更したい場合は、テーブルを選択した状態で右クリックからコンテキストメニューを開き、「New Query」を選択して開かれたQueryタブに必要なSQLスクリプトを入力して実行する。スクリーンショット 2020-11-25 22.47.03.png


最後に

今までOracleばっかりかつSqlDeveloperとかツールを使っていたから拡張機能を使ってテーブルを参照するとか面倒、というかビジュアル的に見難さを感じるけど、なれるしか無い。

2
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
2
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?