show create table \G

alter table userinfo auto_increment=20

desc userinfo:拿到表的描述信息如下
mySQL之自增列起始值、步长

show session variables like ‘auto_in%’
mySQL之自增列起始值、步长

set session auto_increment_increment=2;
mySQL之自增列起始值、步长

show global variables like ‘auto_incre%’;
set global auto_increment_increment=20;

相关文章:

  • 2021-08-24
  • 2021-10-20
  • 2021-10-30
  • 2021-09-25
  • 2021-10-04
  • 2021-10-20
  • 2021-10-20
  • 2021-10-20
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2021-10-20
  • 2021-12-09
  • 2021-10-30
  • 2021-10-20
  • 2021-12-22
相关资源
相似解决方案