如何查看sqlite数据库中有哪些表?sqlite3可以直接到sqlite3的调试界⾯,使⽤.help可查看当前的所有⽤法
root@ROUTER:~# sqlite3
SQLite version 3.16.02017-01-0211:57:58
Enter ".help"for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .databases
main:
sqlite> .help
.auth ON|OFF          Show authorizer callbacks
.backup ?DB? FILE      Backup DB (default"main") to FILE
.
bail on|off          Stop after hitting an error.  Default OFF
.binary on|off        Turn binary output on or off.  Default OFF
.changes on|off        Show number of rows changed by SQL
.check GLOB            Fail if output since .testcase does not match
.clone NEWDB          Clone data into NEWDB from the existing database
.databases            List names and files of attached databases
.dbinfo ?DB?          Show status information about the database
.dump ?TABLE? ...      Dump the database in an SQL text format
If TABLE specified, only dump tables matching
LIKE pattern TABLE.
.echo on|off          Turn command echo on or off
.
eqp on|off|full      Enable or disable automatic EXPLAIN QUERY PLAN
.exit                  Exit this program
.explain ?on|off|auto? Turn EXPLAIN output mode on or off or to automatic
.fullschema ?--indent? Show schema and the content of sqlite_stat tables
.headers on|off        Turn display of headers on or off
.help                  Show this message
.import FILE TABLE    Import data from FILE into TABLE
.imposter INDEX TABLE  Create imposter table TABLE on index INDEX
.indexes ?TABLE?      Show names of all indexes
If TABLE specified, only show indexes for tables
matching LIKE pattern TABLE.
.
limit ?LIMIT? ?VAL?  Display or change the value of an SQLITE_LIMIT
接口文档怎么看.lint OPTIONS          Report potential schema issues. Options:
fkey-indexes    Find missing foreign key indexes
.load FILE ?ENTRY?    Load an extension library
.log FILE|off          Turn logging on or off.  FILE can be stderr/stdout
.mode MODE ?TABLE?    Set output mode where MODE is one of:
ascii    Columns/rows delimited by 0x1F and 0x1E
csv      Comma-separated values
column  Left-aligned columns.  (See .width)
html    HTML <table> code
insert  SQL insert statements for TABLE
line    One value per line
list    Values delimited by .separator strings
quote    Escape answers as for SQL
tabs    Tab-separated values
tcl      TCL list elements
.nullvalue STRING      Use STRING in place of NULL values
.once FILENAME        Output for the next SQL command only to FILENAME
.open ?--new? ?FILE?  Close existing database and reopen FILE
The --new starts with an empty file
.output ?FILENAME?    Send output to FILENAME or stdout
.      Print literal STRING
.
prompt MAIN CONTINUE  Replace the standard prompts
.quit                  Exit this program
.read FILENAME        Execute SQL in FILENAME
.restore ?DB? FILE    Restore content of DB (default"main") from FILE
.save FILE            Write in-memory database into FILE
.scanstats on|off      Turn sqlite3_stmt_scanstatus() metrics on or off
.schema ?PATTERN?      Show the CREATE statements matching PATTERN
Add --indent for pretty-printing
.separator COL ?ROW?  Change the column separator and optionally the row
separator for both the output mode and .import
.shell     Run in a system shell
.
show                  Show the current values for various settings
.stats ?on|off?        Show stats or turn stats on or off
.system     Run in a system shell
.tables ?TABLE?        List names of tables
If TABLE specified, only list tables matching
LIKE pattern TABLE.
.testcase NAME        Begin redirecting output to ''
.timeout MS            Try opening locked tables for MS milliseconds
.timer on|off          Turn SQL timer on or off
.trace FILE|off        Output each SQL statement as it is run
.vfsinfo ?AUX?        Information about the top-level VFS
.
vfslist              List all available VFSes
.vfsname ?AUX?        Print the name of the VFS stack
.width NUM1 NUM2 ...  Set column widths for"column" mode                          Negative values right-justify
sqlite>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。