MySQL補充——獲取自增主鍵的下一個自增值
摘要:本文主要學習了如何獲得自增主鍵的下一個值。
格式
1 select auto_increment from information_schema.tables where table_schema='數據庫名' and table_name='表名';
示例
1 select auto_increment from information_schema.tables where table_schema='bookstore' and table_name='book';