在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ 數(shù)據(jù)庫/ SQLite命令大全
SQLite觸發(fā)器(刪除之前/之后)
SQLite Union All操作符
SQLite快速入門
SQLite LIMIT子句
SQLite更新查詢
SQLite插入查詢
SQLite創(chuàng)建數(shù)據(jù)庫
SQLite datetime()函數(shù)
SQLite now函數(shù)和時(shí)間格式化
SQLite左連接
SQLite AVG()函數(shù)
SQLite交叉連接(Cross Join)
SQLite運(yùn)算符
SQLite ORDER BY子句
SQLite聚合函數(shù)
SQLite Union操作符
SQLite是什么?
SQLite安裝
PHP連接SQLite數(shù)據(jù)庫
SQLite命令大全
SQLite LIKE子句
SQLite OR子句
SQLite內(nèi)連接(Inner Join)
SQLite日期和時(shí)間
SQLite WHERE子句
SQLite刪除表
Python連接SQLite數(shù)據(jù)庫
SQLite刪除觸發(fā)器
SQLite優(yōu)點(diǎn)和缺點(diǎn)
SQLite連接(JOIN子句)
SQLite數(shù)據(jù)類型
SQLite外連接(Outer Join)
SQLite COUNT()函數(shù)
SQLite主鍵
SQLite觸發(fā)器(插入之前/之后)
SQLite HAVING子句
SQLite IN運(yùn)算符
SQLite選擇查詢
SQLite date()函數(shù)
SQLite MAX()函數(shù)
SQLite刪除查詢
SQLite分離數(shù)據(jù)庫
SQLite教程
SQLite GLOB子句
SQLite MIN()函數(shù)
SQLite導(dǎo)入數(shù)據(jù)
SQLite GROUP BY子句
SQLite表達(dá)式
SQLite語法大全
SQLite外鍵
SQLite觸發(fā)器
SQLite導(dǎo)出數(shù)據(jù)
SQLite juliandday()函數(shù)
SQLite創(chuàng)建表
Java連接SQLite數(shù)據(jù)庫
SQLite SUM()函數(shù)
SQLite特性/為什么要使用SQLite?
SQLite觸發(fā)器(更新之前/之后)
SQLite strftime()函數(shù)日期日間格式化
SQLite附加/選擇數(shù)據(jù)庫
SQLite DISTINCT子句
SQLite歷史
SQLite time()函數(shù)

SQLite命令大全

SQLite命令與SQL命令類似。 有三種類型的SQLite命令:

  • DDL:數(shù)據(jù)定義語言
  • DML:數(shù)據(jù)操作語言
  • DQL:數(shù)據(jù)查詢語言

數(shù)據(jù)定義語言

數(shù)據(jù)定義語言中主要有三個(gè)命令:

  • CREATE:此命令用于創(chuàng)建表,數(shù)據(jù)庫中的表或其他對象的視圖。

  • ALTER:此命令用于修改現(xiàn)有的數(shù)據(jù)庫對象,如表。

  • DROPDROP命令用于刪除整個(gè)表,數(shù)據(jù)庫中的表或其他對象的視圖。

數(shù)據(jù)操作語言

數(shù)據(jù)操作語言中主要有三個(gè)命令:

  • INSERT:此命令用于創(chuàng)建記錄。

  • UPDATE:用于修改記錄。

  • DELETE:用于刪除記錄。

數(shù)據(jù)查詢語言

  • SELECT:此命令用于從一個(gè)或多個(gè)表中檢索某些記錄。

SQLite的點(diǎn)命令

以下是SQLite點(diǎn)(.)命令的列表。 這些命令不會以分號(;)終止。

.help

可在任何時(shí)候使用“.help”檢查點(diǎn)命令列表。

例如:

QLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
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 "|"
                         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 STRING...       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
.selftest ?--init?     Run tests defined in the SELFTEST table
.separator COL ?ROW?   Change the column separator and optionally the row
                         separator for both the output mode and .import
.sha3sum ?OPTIONS...?  Compute a SHA3 hash of database content
.shell CMD ARGS...     Run CMD ARGS... in a system shell
.show                  Show the current values for various settings
.stats ?on|off?        Show stats or turn stats on or off
.system CMD ARGS...    Run CMD ARGS... 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 'testcase-out.txt'
.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>

以上是各種SQLite的點(diǎn)(.)命令的列表。 命令及其描述如下表所示:

命令 描述說明
.backup ?db? file 備份數(shù)據(jù)庫(默認(rèn)“main”)到文件中
.bail on/off 遇到錯(cuò)誤后停止,默認(rèn)為off
.databases 附件數(shù)據(jù)庫的列表名稱和文件
.dump ?table? 以sql文本格式轉(zhuǎn)儲數(shù)據(jù)庫。如果指定表,則只轉(zhuǎn)儲表匹配像模式表。
.echo on/off 打開或關(guān)閉echo命令
.exit 退出sqlite提示符
.explain on/off 轉(zhuǎn)向輸出模式適合說明on/off。如沒有參參數(shù),則它為on。
.header(s) on/off 打開或關(guān)閉標(biāo)題的顯示
.help 顯示指定幫助消息
.import file table 將數(shù)據(jù)從文件導(dǎo)入表
.indices ?table? 顯示所有索引的名稱。如果指定表,則只顯示匹配的表的索引,如模式表。
.load file ?entry? 加載擴(kuò)展庫
.log file/off 打開或關(guān)閉日志記錄。文件可以是stderr/stdout
.mode mode 設(shè)置輸出模式
.nullvalue string 打印字符串代替空值
.output filename 發(fā)送輸出到文件名
.output stdout 發(fā)送輸出到屏幕
.print string... 打印文字字符串
.prompt main continue 替換標(biāo)準(zhǔn)提示
.quit 退出sqlite提示符
.read filename 在文件名中執(zhí)行sql
.schema ?table? 顯示創(chuàng)建語句。如果指定表,則只顯示與模式表匹配的表。
.separator string 更改分隔符由輸出模式和.import使用
.show 顯示各種設(shè)置的當(dāng)前值
.stats on/off 打開或關(guān)閉統(tǒng)計(jì)信息
.tables ?pattern? 列出匹配類似模式的表的名稱
.timeout ms 嘗試打開鎖定的表毫秒
.width num num 設(shè)置“列”模式的列寬
.timer on/off 打開或關(guān)閉cpu定時(shí)器測量

.show命令

可以使用.show命令查看SQLite命令提示符的默認(rèn)設(shè)置。

注意:不要在sqlite>提示符和.命令之間放置空格,否則將不起作用。

其它特殊點(diǎn)命令

有一些點(diǎn)(.)命令用于格式化輸出。這些命令是:

.header on

.mode column

.timer on