MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Identity Columns

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Jiten
Beginner


Joined: 06 Apr 2007
Posts: 5
Topics: 2

PostPosted: Fri May 25, 2007 7:27 am    Post subject: Identity Columns Reply with quote

I have a table with Identity Column Defined on it. I insert one row(the only row present) in the table and using the Identity_val_local Function get the latest value of Identity column(suppose 1000). After getting the value I delete the row from the table. Now the table is empty. My question here is, Next time when I insert another row and use the Identity_val_local function the value I get is the next in number i.e. 1001, From where exactly is DB2 picking the previous value and incrementing it to give me 1001 as I have already deleted the row with Identity column 1000.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri May 25, 2007 7:58 am    Post subject: Reply with quote

have no idea, but would look in the systables that are used to define the attributes of the table which has the identity column.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Jiten
Beginner


Joined: 06 Apr 2007
Posts: 5
Topics: 2

PostPosted: Fri May 25, 2007 8:10 am    Post subject: @dbzTHEdinosauer Reply with quote

I have found the Identity Column information in SYSIBM.SYSSEQUENCES and SYSIBM.SYSSEQUENCESDEP. But I am not sure if these tables existed before Version 8 release. As Identity Columns existed before Version 8, where did DB2 store such information?
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri May 25, 2007 8:20 am    Post subject: Reply with quote

They are in V7, I do not know about prior to that - if the manuals are still available on the IBM www you could check them out. But I would have thought it was a case of trivia and not required info.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Fri Jun 01, 2007 10:23 am    Post subject: Reply with quote

In veriosn 7 of DB2 also you can get the Identity columns info from SYSIBM.SYSSEQUENCES catalog table
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group