修改表的AUTO_INCREMENT值

mysql 1062 错误的解决
alter table members AUTO_INCREMENT =32

//alter table members AUTO_INCREMENT =32 ROW_FORMAT = COMPACT;

去掉ALTER TABLE table_name ROW_FORMAT = DEFAULT;

show triggers;

t_afterinsert_on_members         | INSERT | members         | BEGIN
        insert into employeerole(employee_id,role_id) values(new.id,2);
END

发现该触发器对employeerole做了insert操作,
然后发现employeerole 表与记录不符
|          47 |       2 |
|          48 |       2 |
|          49 |       2 |
+-------------+---------+
53 rows in set (0.00 sec)

delete from employeerole where employee_id >31;

删除触发器
DROP TRIGGER t_wiley_hotelComment_bu;

你可能感兴趣的:(auto)