select last_insert_id();
SELECT auto_increment FROM information_schema.tables where table_schema="db_xxx" and table_name="tbl_xxx";
alter table tbl_xxx AUTO_INCREMENT=123456;
select last_insert_id();
SELECT auto_increment FROM information_schema.tables where table_schema="db_xxx" and table_name="tbl_xxx";
alter table tbl_xxx AUTO_INCREMENT=123456;
本文标题:MySQL自增id
本文链接:https://www.haomeiwen.com/subject/nsbddftx.html
网友评论