Whats the purpose of using Nextval while creating the
sequence.

Answers were Sorted based on User's Feedback



Whats the purpose of using Nextval while creating the sequence...

Answer / tharanath.n

NextVal is pseudo column, which gives you the unique number
in the sequence.
nextval increment the sequence and return new value.
currval can only be accessed in given session after at least
one nextval has been issued.

Is This Answer Correct ?    6 Yes 2 No

Whats the purpose of using Nextval while creating the sequence...

Answer / 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

More Oracle AllOther Interview Questions

what is the difference b/w oracle8i and oracle9i

3 Answers   iGate,


How do you add a data file to a tablespace?

1 Answers  


hi iam looking for HRMS(functional) training inst or person in hyderbad. plz help me its urgent

1 Answers  


can we drop dual table

7 Answers   Metric Stream,


what is the difference between TRUNCATE and DELETE command in SQL

23 Answers   ICICI, Saama Tech, SkyTech, TCS,






Name two files used for network connection to a database.

1 Answers  


Hi, IN oracle apps HRMS, if the employee changes his department, and when a conconurrent program is run for calulating the pay, The latest Dept id is not diaplayed, howeber the previous deptid is considered. Please can someone tell me where is the program going wrong, which side?

0 Answers  


I am working in Oracle Clinical 4.5.1 Please explain a bit.How to create Views in OC

4 Answers   Icon,


What is the difference between oracle media recovery and crash recovery?

0 Answers  


IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?

0 Answers  


Should you take the backup of Logfiles if the database is running in ARCHIVELOG mode?

4 Answers  


now iam working as an hr executive in hyderabad i would like to learn oracle hrms kindly suggest me some good institutes in hyderabd

0 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)