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

Can we insert data into materialized view?

710


Why do we need databases?

730


Which command is used to call a stored procedure?

713


What are the advantages of sql?

777


Can we connect to postgresql using sql developer?

699






What is the difference between alter trigger and drop trigger statements?

799


What is a left join?

693


Define union, minus, union all, intersect ?

738


How can I make sql query run faster?

754


Explain the order of sql statement execution?

806


what is the stuff function and how does it differ from the replace function? : Sql dba

788


Can we use insert statement in function?

738


What is form and report?

714


what is single byte over head in oracle..?

2091


what are tables and fields? : Sql dba

768