### シェルからコマンドの実行
$ sqlite3 data.db ".tables"
auth_group auth_user_groups
auth_group_permissions auth_user_user_permissions
auth_message django_content_type
auth_permission django_session
auth_user django_site
sqlite> .databases
seq name file
0 main /home/roka/Dev/Django/tests/data.db
sqlite> .tables
auth_group auth_user_groups
auth_group_permissions auth_user_user_permissions
auth_message django_content_type
auth_permission django_session
auth_user django_site
sqlite> .schema django_session
CREATE TABLE "django_session" (
"session_key" varchar(40) NOT NULL PRIMARY KEY,
"session_data" text NOT NULL,
"expire_date" datetime NOT NULL
);
sqlite> .dump django_site
BEGIN TRANSACTION;
CREATE TABLE "django_site" (
"id" integer NOT NULL PRIMARY KEY,
"domain" varchar(100) NOT NULL,
"name" varchar(50) NOT NULL
);
INSERT INTO "django_site" VALUES(1,'example.com','example.com');
COMMIT;
sqlite> .echo on
sqlite> select * from django_content_type;
select * from django_content_type;
1|message|auth|message
2|group|auth|group
3|user|auth|user
4|permission|auth|permission
5|content type|contenttypes|contenttype
6|session|sessions|session
7|site|sites|site
sqlite> .explain on
sqlite> select * from django_content_type;
id name app_label model
1 message auth message
2 group auth group
3 user auth user
4 permission auth permission
5 content type contenttyp contenttyp
6 session sessions session
7 site sites site
sqlite> .header off
sqlite> select * from django_content_type;
1 message auth message
2 group auth group
3 user auth user
4 permission auth permission
5 content type contenttyp contenttyp
6 session sessions session
7 site sites site
sqlite> .import filename tablename
sqlite> .indices django_content_type
sqlite_autoindex_django_content_type_1
sqlite> .mode html
sqlite> select * from django_content_type;
<TR><TD>1</TD>
<TD>message</TD>
<TD>auth</TD>
<TD>message</TD>
</TR>
......(略)
<TR><TD>7</TD>
<TD>site</TD>
<TD>sites</TD>
<TD>site</TD>
</TR>
sqlite> .nullvalue NULL
sqlite> .output output.txt
sqlite> .prompt "SQL>> "
sqlite> .read "select.sql"
sqlite> .separator ,
sqlite> .show
echo: off
explain: off
headers: off
mode: list
nullvalue: ""
output: stdout
separator: ""
width:
sqlite> .exit
sqlite> .quit