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 28 of 132    Print  
Is it possible to access the current value in a session before accessing next value

  
Total Answers and Comments: 4 Last Update: May 11, 2006   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Shasi
 

You can find the last number used in the session for your sequence from the below mentioned query

select last_number from user_sequences where sequence_name = <your_sequence_name>



Above answer was rated as good by the following members:
kiran_marla
August 22, 2005 07:32:35   #1  
Jagdish        

RE: Is it possible to access the current value in a session before accessing next value
Yes but the curval will get teh same value whcih is already return.

 
Is this answer useful? Yes | No
September 01, 2005 09:16:43   #2  
shlomcar        

RE: Is it possible to access the current value in a session before accessing next value
correct answer:
NEXTAVAL must be issued for that sequence before CURRVAL contaons a value

from Oracle Server SQL references 8

 
Is this answer useful? Yes | No
January 07, 2006 21:01:55   #3  
Shasi        

RE: Is it possible to access the current value in a se...

You can find the last number used in the session for your sequence from the below mentioned query

select last_number from user_sequences where sequence_name <your_sequence_name>


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 11, 2006 14:27:50   #4  
rajanipriya Member Since: May 2006   Contribution: 19    

RE: Is it possible to access the current value in a se...

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


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
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