Whats the purpose of using Nextval while creating the
sequence.

Answer Posted / sreekanth

To get the next value of a sequence, we use nextval.


NextVal is pseudo column, which gives you the AVAILABLE
number in the sequence.
Remember the nextval value also depends on the cache you
have given, while creating the sequence.
If you want current value of a sequence you can use CurVal.
In a session you cannot use current value without getting
next value.
In 11g the you can use the nextval without using the query.
ie
select seq_name.nextval into ln_seqnextval from dual;
can be replaced by
ln_seqnextval := seq_name.nextval;

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the sql query to find the employee who has Nth maximum salary?

4285


What is mrc and what is its use? : oracle accounts receivable

629


What are the standard concurent programs for auto invoice interface and customer interfaces? : oracle accounts receivable

624


Differentiate between writeoff and receipt writeoff. : oracle accounts receivable

732


What is the disk migration? what is the steps involved in oracle disk migration?

717






Could you please let me know the interfaces in OM / FA??

1734


What is the meaning of "Modulus" and "Alignment" in a datafile. Data file might be from any database. Data file is created through unloading data from a table. So, while loading this data into my table, I need to use these keywords. Could any one can help me regarding this?

1593


please send me oracle pl/sql exp resume. and also faqs...

2036


where the dff data will be stored

1801


what are the tools used for oracle 10g in real time.

1929


Where in the Oracle directory tree structure are audit traces placed?

2123


HOW TO SAVE UNIVERSES AND DOCUMENTS IN THE REPOSITORY?

1585


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

1839


can u give guidance abt packages of plsql

1644


How would you go about increasing the buffer cache hit ratio?

1953