Update ch01: 初识数据库.md
This commit is contained in:
@@ -382,7 +382,7 @@ MySQL索引的建立对于MySQL的高效运行是很重要的,索引可以大
|
||||
索引创建了一种有序的数据结构,采用二分法搜索数据时,其复杂度为 log2(N),1000多万的数据只要搜索23次,其效率是非常高效的。
|
||||
|
||||
- 如何创建索引
|
||||
- Oracle Database:甲骨文公司的RDBMS
|
||||
|
||||
- 创建表时可以直接创建索引,语法如下:
|
||||
```sql
|
||||
CREATE TABLE mytable(
|
||||
@@ -394,10 +394,9 @@ username VARCHAR(16) NOT NULL,
|
||||
INDEX [indexName] (username(length))
|
||||
|
||||
);
|
||||
|
||||
```
|
||||
- Oracle Database:甲骨文公司的RDBMS
|
||||
- 也可以使用如下语句创建:
|
||||
- 也可以使用如下语句创建:
|
||||
|
||||
```sql
|
||||
-- 方法1
|
||||
CREATE INDEX indexName ON table_name (column_name)
|
||||
|
||||
Reference in New Issue
Block a user