MySQL Key值pri uni 和mul,以及extra中的auto-increment

pri   表示主键,唯一    在新建表时加上primary key

例如:  id bigint(20) unsigned primary key not null  

uni  表示唯一  在新建表时加上unique

例如:  id bigint(20) unsigned  UNIQUE  default NULL   

mul  可以重复,添加了索引 

CREATE INDEX index_name ON table_name (column_name)

pri>uni>mul


auto-increment就是自动增加的意思,比如id自动增加。

例如:  id bigint(20) unsigned auto-increment primary key not null  

你可能感兴趣的:(小菜鸡历险记,mysql)