为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。 【DM版本】:dm8 【操作系统】:麒麟v10 【CPU】: 【问题描述】*:![1751902740912.png] 如图存储过程 ,oracle转达梦update....returning....into返回参数输出作为主键,当多并发时,有主键重复的情况,如何解(oracle没有这种情况 )
--加个for update试试 select count(1) into num from tskeygenerator where taskobjpn_ve=i_tablename for update;
看逻辑实际为实现自增主键功能? 可以考虑使用序列或者自增列实现,上述存储过程高并发下本来就是有逻辑漏洞
--加个for update试试
select count(1) into num from tskeygenerator where taskobjpn_ve=i_tablename for update;