Mysql 根据第二个主键自增
来源:https://blog.csdn.net/rzt_xiaoren/article/details/50582097
CREATE TABLE main_user( id INT NOT NULL , uid INT NOT NULL AUTO_INCREMENT, name_ CHAR(16) NOT NULL, PRIMARY KEY (id,uid) ) ENGINE=MyISAM; INSERT INTO main_user(id, name_) VALUES(1,'小明'),(1,'小华'),(2,'小红'),(2,'小吴'),(1,'小花'),(3,'吴老师'),(2,'苍老师');