ITeye博客

Sqlite 小笔记

Crabby · 2012-05-26 00:25 · Sqlite · 数据库 · SQLite · Markdown

1.如何查询Sqlite 数据库中的所有表信息 From within a c/c++ program (or a scritpt using tcl/Ruby/Perl/Python bindings),you can get access to table and index names by doing a select on a special table named "SQULITE_MASTER",Every SQLite database has an SQLITE_MASTER table that defines the schema for the database ;

比如: sqlite> select name from sqlite_master where type='table' order by name; name = carts name = line_items name = orders name = products name = schema_migrations name = sqlite_sequence

======================================= 或者直接使用此命令 .tables 或者使用简写 .tab sqlite> .tables carts orders schema_migrations line_items products users

2.如何删除Sqlite 数据库中某一张表中的所有数据 命令 delete from table_name; sqlite > delete from users;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。