「SQLite3」separator コマンドの使い方

環境
Windows 10 Home 64bit
sqlite 3.37

使用例
1.現在設定されている区切り文字を確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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.区切り文字を,に変更します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sqlite> .separator ,
sqlite> .separator ,
sqlite> .separator ,

3.SELECT 文を実行します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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

 

SQLite

Posted by arkgame