我正在寻找一个MySQL代码来设置一个自动递增的订单号。
这已经在数据库中了,但我想更改订单号,希望有人能帮上忙。
非常感谢弗莱明
发布于 2017-06-06 00:24:06
您可以按照https://dev.mysql.com/doc/refman/5.7/en/replication-options-master.html#sysvar_auto_increment_increment文档中的说明更改自动增量和偏移量
SET @@auto_increment_increment=x;
SET @@auto_increment_offset=y;其中x&y是需要设置的值
https://stackoverflow.com/questions/44373089
复制相似问题