且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获取序列中的下一个值?

更新时间:2022-01-02 22:14:44

问题是含糊不清回答问题。我建议你阅读这个:

ORA-06512 [ ^ ]

ORA-00900 [ ^ ]
The question is to vague to answer it. I'd suggest to read this:
ORA-06512[^]
ORA-00900[^]


hi Member 10740412,

当我执行相同的代码时这是第一次出现同样的错误。如果序列没有在执行过程的模式中创建,我们将得到这些错误。

我会建议你一些逻辑可以解决你的问题。我们将使用动态编程用于该程序



1。首先检查序列是否存在(如果不存在)然后自动创建序列,否则它将退出块。



2.在该块之后执行操作




创建此程序后现在执行您的示例



3.Test theTest代码示例



让我知道你如何查看这些区块



问候

Smart003
hi Member 10740412,
When I had executed the same code for the first time, got the same errors. We will get those errors if the sequence was not created in that schema where the procedure was executed.
I will suggest you some logic this may resolve your problem .We will use dynamic programing for that procedure

1. First check whether the sequence exist or not if not exist then automatically create the sequence otherwise it will exit the block.

2. After that block do the operations


after creation of this procedure now execute with your example

3.Test the code with an example

let me know how you check those block

regards
Smart003