auto_increment
mysql修改自动增长值auto_increment
一、mysql 修改AUTO_INCREMENT的值。注意:修改的auto_increment的值得大于现有主键的最大值。否则,语句不报错,但不会生效。 执行sql如下,“tablename”为数据表名称。 ALTER TABLE tablename auto_increment=1234; 二、修 ......
mysql中truncate表对auto_increment的影响
在mysql中,如果对表执行truncate操作后,会重新设置auto_increment的值,比如: root@localhost (none)>use abce; Database changed root@localhost abce>create table test(id int not ......