MySQL 创建索引(Create Index)的方法和语法结构及例子
CREATE INDEX Syntax很文博客-https://www.zhenjiekeji.com/51793.html
CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name很文博客-https://www.zhenjiekeji.com/51793.html
[index_type]很文博客-https://www.zhenjiekeji.com/51793.html
ON tbl_name (index_col_name,...)很文博客-https://www.zhenjiekeji.com/51793.html
[index_type]很文博客-https://www.zhenjiekeji.com/51793.html
index_col_name:很文博客-https://www.zhenjiekeji.com/51793.html
col_name [(length)] [ASC | DESC]很文博客-https://www.zhenjiekeji.com/51793.html
index_type:
USING {BTREE | HASH | RTREE}
- -- 创建无索引的表格
- create table testNoPK (
- id int not null,
- name varchar(10)
- );
- -- 创建普通索引
- create index IDX_testNoPK_Name on testNoPK (name);
我的微信
微信号已复制
扫一扫更精彩
大家的支持是我更新的动力!!!





