这里SQL语句中的"%s"将被你传入的参数代替. 你就可以只显示一部分的schema. 事实上".tables"的也是采用这种"LIKE"的方式,进行pattern查询的。 ".databases"命令将列出当前connection中所有的数据库。 一般至少包含2个,一个是 "main", the original database opened.另一个是"temp", the database used for tem...
sqlite>.tables tbl1 tbl2 sqlite> ".tables"和在list模式下执行下面的语句相似: SELECT name FROM sqlite_master WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%' UNION ALL SELECT name FROM sqlite_temp_master WHERE type IN ('table','view') ORDER BY 1 实际上, 如果你查看sqlite...
List names of tables matching a LIKE pattern(查看数据库的表列表) .timeout MS Try opening locked tables for MS milliseconds(在 MS 时间内尝试打开被锁定的表) .width NUM NUM ... Set column widths for "column" mode(设置 column 模式中的列的宽度) .timer ON|OFF (显示CPU时间) .vfsname ?AUX?
.bail ON|OFF Stop after hitting an error. Default OFF .databases List names and files of attached databases .dump?TABLE? ... Dump the databaseinan SQL text format If TABLE specified, only dump tables matching LIKE pattern TABLE. .echo ON|OFF Turn command echo on or off .exit Exitthisp...
.vfslist List all available VFSes .vfsname ?AUX? Print the name of the VFS stack .width NUM1 NUM2 ... Set minimum column widthsforcolumnar output .open filename - 打开或创建一个SQLite数据库文件 .tables - 列出当前数据库中的表
sqlite>.tables bak long//导入的是空表bak,long 数据的导出和导入: 导出:例如: $sqlite3 data.db sqlite> .mode list sqlite> .separator | sqlite> .outputtest_file_1 sqlite> select * fromlong; sqlite> .exit $ cattest_file_1 hhhhhh|2 hello|2 ...
sqlite> .tables sqlite> .exit $ ls test.db The.tablescommand gives a list of tables in thetest.dbdatabase. There are currently no tables. The.exitcommand terminates the interactive session of thesqlite3command line tool. Thelscommand shows the contents of the current working directory. We ...
要使用sqlite,需要从sqlite官网下载到三个文件,分别为sqlite3.lib,sqlite3.dll,sqlite3.h,然后再在自己的工程中配置好头文件和库文件,同时将dll文件放到当前目录下,就完成配置可以使用sqlite了。 使用的过程根据使用的函数大致分为如下几个过程: sqlite3_open() ...
.dbconfig ?op? ?val? List or change sqlite3_db_config() options .dbinfo ?DB? Show status information about the database .dump ?OBJECTS? Render database content as SQL .echo on|off Turn command echo on or off .eqp on|off|full|... Enableor disable automatic EXPLAIN QUERY PLAN ...
Test_table:test id name sex height born 1 杨幂 woman 161 1986 2 刘诗诗 woman 158 1987 3 黄晓明 man 180 1977 4 刘涛 man 163 1978 5 刘伟 man 190 1987 1、创建数据库:sqlite3/sdcard/test.db;#也可读取test.db 2、创建表:createtable表名(元素名类型,…);create tabletest(idinteger PRIMARY ...