Page 1 of 1

Update query

PostPosted: Fri Dec 21, 2012 1:44 pm
by hvats83
In a COBOL\DB2 program if I am updating a column value (which is part of index) which option is better-
First delete the record which ging to be updated and then insert new record with updated values
or
directly using update query

Re: Update query

PostPosted: Fri Dec 21, 2012 3:02 pm
by GuyC
update would only relocate (delete/insert) in that one indexspace.
Think about what an actual delete/insert would do concerning entry in the tablespace and other indexpaces, what if this row has children?

Re: Update query

PostPosted: Fri Dec 21, 2012 3:20 pm
by hvats83
The table being updated in program is not having child tables