SQLite基础学习 互动版

在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

说明:

  SQLite 的indexed by子句 就是利用索引来对数据库进行操作,这样能加快速度。

语法:

SELECT|DELETE|UPDATE column1, column2...
INDEXED BY (index_name)
table_name
WHERE (CONDITION);

实例:

  在student中创建一个索引。

create index student_index on student(ADDRESS);

  就像下面这样使用就可以:

sqlite> select * from student indexed by student_index where ADDRESS='shenzhen';
ID          NAME        AGE         ADDRESS
----------  ----------  ----------  ----------
5           honghong    17          shenzhen
7           tingting    23          shenzhen