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

How do you declare a variable in pl sql?

537


What is the difference between delete and truncate commands?

517


What is nosql example?

587


Differentiate between pl/sql and sql?

621


What is union and union all keyword in sql and what are their differences?

579






What are triggers in sql?

584


Explain select statements in sql?

594


What is the difference between partition and index?

485


What are different types of statements supported by sql?

614


What is varchar data type in sql?

521


What are all the different normalization?

566


What is sqlservr exe?

482


What are aggregate and scalar functions?

530


Is sql an operating system?

546


what is the command used to fetch first 5 characters of the string? : Sql dba

1142