.unique索引补充:联合唯一 unique(name,email)是name和email这两列联合起来唯一,不再试某个字段唯一 .主键索引,类似唯一索引,也是允许联合多个字段作为主键,例如:primary(nid,name) .组合索引,多列共同组成索引 注意:例如index(name,email)---->最左前缀 select* from info where name='xxx' and email ='xxx' 是走索引的 select* from info where name='…