mysql非主键自增长 2015/04/15 | IT技术,脚本和标记 | frogchou | 暂无评论 | 2481 views 在网上查过一些资料,很多人说,mysql中,只有主键才能设置为自增长列。经过一些深入的了解,其实并非只有主键才能设自增长,而是设为“键(key)”的列就可以设置自增长。 一个失败的句子:create table test(id int,number int auto_increment not null); 提示:there can be only one auto column and it must be defined as……