View previous topic :: View next topic |
Author |
Message |
Jiten Beginner
Joined: 06 Apr 2007 Posts: 5 Topics: 2
|
Posted: Fri May 25, 2007 7:27 am Post subject: Identity Columns |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri May 25, 2007 7:58 am Post subject: |
|
|
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 |
|
|
Jiten Beginner
Joined: 06 Apr 2007 Posts: 5 Topics: 2
|
Posted: Fri May 25, 2007 8:10 am Post subject: @dbzTHEdinosauer |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri May 25, 2007 8:20 am Post subject: |
|
|
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 |
|
|
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Fri Jun 01, 2007 10:23 am Post subject: |
|
|
In veriosn 7 of DB2 also you can get the Identity columns info from SYSIBM.SYSSEQUENCES catalog table |
|
Back to top |
|
|
|
|