View previous topic :: View next topic |
Author |
Message |
db2rules Beginner

Joined: 02 Dec 2002 Posts: 4 Topics: 2 Location: Austin Texas
|
Posted: Wed Nov 26, 2003 11:17 am Post subject: Update primary key question |
|
|
hello all,
When a primary key is updated, does DB2 still do a Delete/Insert (index row AND data row?)
thanks,
DB2 Rules |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Nov 26, 2003 1:16 pm Post subject: |
|
|
Db2Rules,
You can only update a primary key if the table is a stand alone table(no child table) or the table is not partitioned.
If you updating such tables, yes an INDEX maintanence is done by DB2 dropping the old entry upon successful execuetion of your query.
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
db2rules Beginner

Joined: 02 Dec 2002 Posts: 4 Topics: 2 Location: Austin Texas
|
Posted: Wed Nov 26, 2003 1:29 pm Post subject: |
|
|
Hey Kolusu,
so does that mean the data row in the table is del/isrt'ed? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Nov 26, 2003 2:00 pm Post subject: |
|
|
Db2rules,
Yes the old row is deleted and the new row is inserted.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|