Row Level Locking
Posted in 1994
Dear Informixer: I have a question on informix row level locking. I have two tables: department and account table department table account dept char(3), dept char(3), amount integer account integer, amount integer If I execute the following update statement UPDATE department SET amount = (SELECT SUM(amount) FROM account WHERE dept = "DEP") WHERE dept = "DEP" Is this considered a one transaction, OR Is it possible: After select the sum and before updating department, other program at the same time update the amount on account table and update the department table with the new sum. Then, update of this statement will be executed which will result in the different amount on table department and account. Which I want to avoid. Any suggestion, comments? Thank You in advance, Calvin ################################################################ # Calvin Chen ###### ###### # Phone: (914) 644-2144 # # # Email: calvin@nynexst.com ###### # ###### ################################################################