0
votes

I need to debug an Oracle procedure code but I am new to Oracle. In the procedure I see a line of code like the following, but I cannot locate its implementation in order figure out what it's doing.

select SOME_OBJECT_OR_PACKAGE.NEXTVAL into some_var from dual;

It looks like it's calling a function from a package to me but I don't see a package with that name in the Packages folder from SQL Developer. I have tried the following command but got nothing in return.

select * from all_source where UPPER(name) like UPPER('%SOME_OBJECT_OR_PACKAGE%')

Please help.

2
search all_objects, you'll see your sequence there. You can also find it SQL Developer, under the sequences node. - thatjeffsmith

2 Answers

3
votes

NEXTVAL is way to retrieve the next value in a SEQUENCE in Oracle.

see here for more details: http://www.techonthenet.com/oracle/sequences.php

or here: Create Table With Sequence

0
votes

It's a database object called a sequence. It auto-increments when you select it.