惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - AK747

关于"Google限制Python"事件我的看法 - AK747 - 博客园 JsEasy简介 - AK747 - 博客园 Bjam简明教程 该Blog停止更新,新的blog地址http://www.cppblog.com/zuroc/ [原创]《程序员,在路上……》第1节——用OPENEL画出麦克斯维速率分布曲线 用程序画出麦克斯维速率分布曲线 在sourceforge看到的一段文字,由此联想到<<暴风影音>> 大一时写的诗,张沈鹏 学习SQlite-语法示例 转载-SQLite语法备忘录 作者:http://blog.csdn.net/ezdevelop/结构定义 学习+翻译《SQL As Understood By SQLite》--ON CONFLICT clause 【转载】事务处理的定义 [转载]SQlite 常用函数学习笔记 [转载]SQLite介绍 [转载]在 LCC 下怎样编译Sqlite 学习+翻译《SQL As Understood By SQLite》--INSERT 在程序中用SQlite.txt 初学SQLite数据库 我搞了一个开源的项目,网址http://akenxp.gro.clinux.org目前还是计划阶段,欢迎大家加盟。
学习+翻译《SQL As Understood By SQLite》--CREATE INDEX
AK747 · 2005-08-03 · via 博客园 - AK747

[Contents]

CREATE INDEX

sql-statement ::= CREATE [UNIQUE] INDEX [database-name .] index-name
ON
table-name ( column-name [, column-name]* )
[ ON CONFLICT conflict-algorithm ]
column-name ::= name [ COLLATE collation-name] [ ASC | DESC ]

The CREATE INDEX command consists of the keywords "CREATE INDEX" followed by the name of the new index, the keyword "ON", the name of a previously created table that is to be indexed, and a parenthesized list of names of columns in the table that are used for the index key. Each column name can be followed by one of the "ASC" or "DESC" keywords to indicate sort order, but the sort order is ignored in the current implementation. Sorting is always done in ascending order.

"CREATE INDEX"后面跟新的index(索引)的名称.将为关键字"ON"后接的表生成索引.索引是新生成的名称为"(" + 表中列名 + ")"的列.列可以用关键字"ASC"或"DESC"跟随来指明它的排列顺序.(当前版本忽略这两个关键字,统一为升序).

The COLLATE clause following each column name defines a collating sequence used for text entires in that column. The default collating sequence is the collating sequence defined for that column in the CREATE TABLE statement. Or if no collating sequence is otherwise defined, the built-in BINARY collating sequence is used.

(这一段究竟是什么意思?)COLLATE语句跟着各个列的名字,定义了列中输入内容的排列顺序.默认的排列顺序是CREATE TABLE时定义的.如果没有另行定义,编译成二进制的顺序被应用.

There are no arbitrary limits on the number of indices that can be attached to a single table, nor on the number of columns in an index.

(???)

If the UNIQUE keyword appears between CREATE and INDEX then duplicate index entries are not allowed. Any attempt to insert a duplicate entry will result in an error.

如果CREATE和INDEX之间使用了关键字UNIQUE,重复的索引是不允许的.试图插入重复的条目会导致错误.

The optional conflict-clause allows the specification of an alternative default constraint conflict resolution algorithm for this index. This only makes sense if the UNIQUE keyword is used since otherwise there are not constraints on the index. The default algorithm is ABORT. If a COPY, INSERT, or UPDATE statement specifies a particular conflict resolution algorithm, that algorithm is used in place of the default algorithm specified here. See the section titled ON CONFLICT for additional information.

The exact text of each CREATE INDEX statement is stored in the sqlite_master or sqlite_temp_master table, depending on whether the table being indexed is temporary. Every time the database is opened, all CREATE INDEX statements are read from the sqlite_master table and used to regenerate SQLite's internal representation of the index layout.

准确的CREATE INDEX的状态被保存在sqlite_mastersqlite_temp_master的表中(这取决于表是否是临时被生成索引).每当数据库被打开,sqlite_master会读取所有索引的状态用来生成SQLite内部的index布局.

Indexes are removed with the DROP INDEX command.

This page last modified on 2005/05/10 16:11:41