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

Answer Posted / p.rajasekar

We cannot directly get Current value from the sequence.So
first we need to get the next value, then we can get the
current value in the same scope


select sequencename.nextval from tablename

select sequencename.currval from tablename

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is crud stand for?

746


What is cross join sql?

684


how to include numeric values in sql statements? : Sql dba

770


what is the command line end user interface - mysql? : Sql dba

697


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

870






How long it takes to learn pl sql?

724


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

1894


What is cross join example?

736


Explain what is dbms?

787


What are stored procedures used for?

731


What are the different sql languages?

740


What is replication id?

683


What is recursive join in sql?

752


What steps server process has to take to execute an update statement?

710


What are the parts of a sql statement?

765