【Mysql】自增步长调整,自增
mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 2 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.03 sec)
mysql> set @@global.auto_increment_increment = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 2 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.07 sec)
mysql> set @@auto_increment_increment =1;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.04 sec)
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。