SQLiteコマンドラインツール
【開発環境】
OS:Windows 10 (64bit)
コマンドプロンプト
参照サイト→DBOline
【SQLiteコマンド】
1.データベースの作成
C:\Users\shyok>cd D:\pg\sqlite3
C:\Users\shyok>D:
D:\pg\sqlite3>sqlite3 myfriend.sqlite3
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite>
テーブルを作る
sqlite> create table personal(id,name);
sqlite>
テーブル確認をする←コマンド
sqlite> .table
personal
sqlite>
sqlite> .exit
D:\pg\sqlite3>
よって、D:\pg\sqlite3ディレクトリに表示される

2.データベースの位置の確認
※データベースへの接続しないとコマンドは発行できない
D:\pg\sqlite3>sqlite3 myfriend.sqlite3
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite>
sqlite> .databases←コマンド
main: D:\pg\sqlite3\myfriend.sqlite3
sqlite>
ちなみに、データベースのバックアップ/削除は
myfriend.sqlite3 データベースをコピーしてファイル名を書き換えるだけ

削除はファイル削除と同じ
3.現在の設定の値を表示する
C:\Users\shyok>cd D:\pg\sqlite3
C:\Users\shyok>D:
D:\pg\sqlite3>sqlite3 myfriend.sqlite3
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
コマンド
sqlite> .show
echo: off
eqp: off
explain: auto
headers: off
mode: list
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width:
filename: myfriend.sqlite3
sqlite>
それ以外のコマンド→SQLiteコマンド
※コメント投稿者のブログIDはブログ作成者のみに通知されます