更新时间:2021-08-12 06:48:42
我认为您无法确定 next id,因为有人可能会在您询问后插入新行为下一个ID.您至少需要一笔交易,并且如果我没记错的话,您只能在插入之后获得使用的实际ID,至少这是处理该ID的常用方法-请参见 http://dev.mysql.com/doc/refman/5.0/zh/getting-unique-id.html
I don't think you can ever be sure on the next id, because someone might insert a new row just after you asked for the next id. You would at least need a transaction, and if I'm not mistaken you can only get the actual id used after inserting it, at least that is the common way of handling it -- see http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
SpringCloud07_Nacos的概述、安装、搭建提供者、消费者工程案列、配置中心、Namespace、Group、Data ID、高可用的集群配置(六)
SpringCloud07_Nacos的概述、安装、搭建提供者、消费者工程案列、配置中心、Namespace、Group、Data ID、高可用的集群配置(一)
SpringCloud07_Nacos的概述、安装、搭建提供者、消费者工程案列、配置中心、Namespace、Group、Data ID、高可用的集群配置(七)
SpringCloud07_Nacos的概述、安装、搭建提供者、消费者工程案列、配置中心、Namespace、Group、Data ID、高可用的集群配置(二)