「SQLite3」separator コマンドの使い方
環境
Windows 10 Home 64bit
sqlite 3.37
使用例
1.現在設定されている区切り文字を確認します
sqlite> .show
echo: off
eqp: off
explain: auto
headers: off
mode: list
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width:
filename: arkgame.sqlite3
sqlite> .show
echo: off
eqp: off
explain: auto
headers: off
mode: list
nullvalue: ""
output: stdout
colseparator: "|"
rowseparator: "\n"
stats: off
width:
filename: arkgame.sqlite3
sqlite> .show echo: off eqp: off explain: auto headers: off mode: list nullvalue: "" output: stdout colseparator: "|" rowseparator: "\n" stats: off width: filename: arkgame.sqlite3
2.区切り文字を,に変更します
sqlite> .separator ,
sqlite> .separator ,
sqlite> .separator ,
3.SELECT 文を実行します
sqlite> select * from testbl;
1001,tokyo
2002,34.56
3003,you'are a good boy
sqlite> select * from testbl;
1001,tokyo
2002,34.56
3003,you'are a good boy
sqlite> select * from testbl; 1001,tokyo 2002,34.56 3003,you'are a good boy