MySQL 创建索引(Create Index)的方法和语法结构及例子

数据库评论336字数 85阅读模式

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}

  1. -- 创建无索引的表格
  2. create table testNoPK (
  3. id int not null,
  4. name varchar(10)
  5. );
  6. -- 创建普通索引
  7. create index IDX_testNoPK_Name on testNoPK (name);
weinxin
我的微信
微信号已复制
扫一扫更精彩
大家的支持是我更新的动力!!!
匿名

发表评论

匿名网友