80

MySQL索引概述-夜流璃雨-51CTO博客

 6 years ago
source link: http://blog.51cto.com/13399294/2065893
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
索引的类型:1.INDEX:普通索引2.PRIMARY KEY:主键3.UNIQUE:唯一索引4.FOREIGN KEY:外键5.FULLTEXT:群文索引 例:建表的时候指定索引字段 -INDEX(字段1),INDEX(字段2)... mysql>create database ku; mysql>create table ku.abc( >id int(2) not null, >name varchar(4) not null, >age int(3) not null, >index(name),index(age) >); mysql>desc ku.abc; Field Type Null Key Default Extra .. .. .. MUL .. .. mysql>insert into ku.abc values(1,"wang",23); mysql>select * from ku.abc;

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK