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

Answer Posted / tulsi

select currval.sequence_name from table_name

select nextval.sequence_name from table_name

Is This Answer Correct ?    0 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the types of subquery? : Sql dba

593


Does oracle roll back the transaction on an error?

541


Is it possible to create startup or shutdown trigger for on-schema?

590


What are the uses of sysdate and user keywords?

633


What is a nested table in word?

534






What is trigger in pl sql with examples?

525


Where is sql database stored?

521


Which operator is used in query for pattern matching?

631


What is the purpose of the partition table?

549


How many types of relationship are there?

549


what are all the common sql function? : Sql dba

587


Differentiate between sga and pga.

677


What is a primary key example?

520


How does postgresql compare to mysql?

577


Explain the the delete statements in sql?

581