July 19, 2010

SQLite common command

SQLiteの起動、データベースの選択/作成

sqlite DB_NAME

DB_NAMEは実際のファイル名と同じです。例えば:
sqlite db/development.sqlite3

テーブル一覧

.tables
.ta

テーブルスキーマを見る

.schema TABLE_NAME

ヘルプ

.help

シェルモードを終了

.quit
.exit

詳しくはhttp://www.sqlite.org/sqlite.htmlを参照してください。

English

To start SQLite program, select/create a Database

sqlite DB_NAME

DB_NAME is also the file name.For example:
sqlite db/development.sqlite3

List names of tables

.tables
.ta

Show the create statements

.schema TABLE_NAME

Help

.help

Exit SQLite program

.quit
.exit

For more information, visit http://www.sqlite.org/sqlite.html.

Share on Twitter Share the post
Qihuan Piao

Qihuan Piao

(aka kinopyo) is Chinese based in Tokyo. Software writer. He shares stories inspired him in this blog. His infamous line - "I feel calm when I kill those monsters, or people (in game)" shocks his friends deeply.

He also writes in Japanese and Chinese.