欢迎投稿

今日深度:

【Mysql】自增步长调整,自增

【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)
www.htsjk.Com true http://www.htsjk.com/Mysql/37760.html NewsArticle 【Mysql】自增步长调整,自增 mysql show variables like %increment%;+-----------------------------+-------+| Variable_name | Value |+-----------------------------+-------+| auto_increment_increment | 2 || auto_increment_offset | 1...
相关文章
    暂无相关文章
评论暂时关闭