設置自增列的步長和起始值


--設置局部自增步長

set    session  auto_increment_increment=2;

--設置全局自增步長

set   global    auto_increment_increment=2;

--查看局部步長

show   session  variables  like  'auto_inc%';

--查看全局步長

show  global   variables   like  'auto_inc%';

--設定起始值

set   session  auto_increment_offset=10;

set  global  auto_increment_offset=10;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM