首页 > 技术文章 > 005MySQL技巧001获取自增主键的下一个自增值

zhibiweilai 2020-07-01 15:09 原文

1 格式

1 select auto_increment from information_schema.tables where table_schema='数据库名' and table_name='表名';

2 示例

1 select auto_increment from information_schema.tables where table_schema='bookstore' and table_name='book';

 

推荐阅读