GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 87 of 132    Print  
How to access the current value and next value from a sequence ? Is it possible to access the current value in a session before accessing next value ?
Sequence name CURRVAL, Sequence name NEXTVAL.It is not possible. Only if you access next value in the session, current value can be accessed.


  
Total Answers and Comments: 1 Last Update: June 12, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 12, 2006 10:37:00   #1  
RamPrasad K        

RE: How to access the current value and next value fro...

Hi

Yes We can use current and next values from a sequence.

-Regards


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Quote  A ROWID is created by Oracle for each new row in every table, it is a pseudo column that has a value for every row in a table. The ROWID gives us the physical address of a row and is the fastest way to access any row. The ROWID contains 3 ...

Latest Answer : select .nextval from dual;select .currval from dual;orselect * from user_sequences where sequence_name = ;here last_number is your currval and last_number + increment_by is your nextval ...

Latest Answer : Nextval must be used to generate a sequence number in the current user's session before currval can be referenced. ...

Answer posted by Scott on 2005-05-25 18:39:48: When you create a sequence with CYCLE option, you are saying that when the sequence reaches its MAXVALUE, it will start over at the MINVALUE. This is not 
Latest Answer : when a sequence is created with CYCLE option, this mean that when a sequence reaches its MAXVALUE, it will start over at the MINVALUE. The CYCLE option is not wise for the primary key column.And when a sequence is created with NOCYCLE option, this ...

Using ROWID.CONSTRAINTS 
Latest Answer : by using the index and rowid ...

How to access the current value and next value from a sequence ? Is it possible to access the current value in a session before accessing next value ?
Sequence name CURRVAL, Sequence name NEXTVAL.It is not possible. Only if you access next value in the session, current value can be accessed. 

CYCLE specifies that the sequence continues to generate values after reaching either maximum or minimum value. After pan ascending sequence reaches its maximum value, it generates its 
Latest Answer : No cycle:  after reaching to max val sequence will not give nextvalcycle     after reaching to max val sequence will restart with startwith option vlues ...

Latest Answer : select to_char(sysdate,'dd-mm-yy hh24:mi:ss')from dual; ...
Read Answers (6) | Asked by : XXXX

How do you get back into SQLPlus to disable restricted session if you enabled. 
Latest Answer : "When database is in restricted mode only users who have restricted permissions can log on to database"  To disable itALTER  SYSTEM DISABLE RESTRICTED SESSION ...
Read Answers (2) | Asked by : duke147


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Accessing Repository Resources with SQL

Accessing Repository Resources with SQL In fact Oracle XML DB repository resources are stored in a set of database tables and indexes which can be accessed via SQL You are not supposed to access those tables directly Instead Oracle XML DB provides two public views RESOURCE VIEW and PATH VIEW through
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

jQuery - Marking the Current Page

Learning jQuery Marking the Current Page Our pager can be made more user friendly by highlighting the current page number We just need to update the classes on the buttons every time one is clicked mosgoogle geshibot lang php" var pager ; for var page 0; page numPages; page pag
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape