豚吐露@wiki

SQLite

最終更新:

ohden

- view
管理者のみ編集可

SQLite

◆環境
Ubuntu 10.04LTS



◆使い方
  • SQLite起動
> sqlite3 【DB名】
  • ヘルプ閲覧
sqlite> .help
  • table名一覧取得
sqlite> .table
※.tables でもok
e.g.)
hoge schema_migrations
  • SQLでtable名一覧取得
  1. SELECT
  2. tbl_name
  3. FROM
  4. sqlite_master
  5. WHERE
  6. TYPE = 'table'
  7. ORDER BY
  8. tbl_name
  9. ;

  • table構造取得
sqlite> .schema 【TABLE名】
e.g.)
sqlite> .schema hoge
CREATE TABLE hoge(id integer, name varchar(255));


更新日: &lastmod

名前:
コメント:

すべてのコメントを見る
記事メニュー
目安箱バナー