How to access the current value and next value from a
sequence?

Answer Posted / shai

select *
from user_sequences;

The last_number column will display the number available
next.
if no_cache is used in sequence definition then you can
trust on last_number column from user_sequence.
But if cache is used then below will take place:

If Cache is 20 then last_number will display any number
within range of sequence currval+20

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is package in pl sql with an examples?

551


Is sql sequential or random?

543


What are the sql aggregate functions?

612


How many clustered indexes can be created on a table?

595


Explain what is an index?

598






What are the indexing methods?

583


how to select first 5 records from a table? : Sql dba

511


What are the parts of a basic sql query?

518


How is indexing done in search engines?

531


define sql update statement ? : Sql dba

584


What is group function in sql?

543


What are the different types of dbms?

556


what is a trigger in mysql? Define different types of trigger. : Sql dba

558


What is asqueryable?

535


what is blob? : Sql dba

564