Chapter 5. Log analysis 77
update sales set region='South' where region='Ontario-South';
The obvious way to undo this would be:
update sales set region='Ontario-South' where region='South';
However, undoing changes this way can introduce data integrity problems. What
if there were already rows in the sales table that were region South before the
original update was done. Undoing the update as suggested above would also
affect those rows, which is not what we want.
Therefore, Recovery Expert uses a different approach. Log analysis works
row-by-row. The original statement actually changed 13 rows in the SALES table,
so the Undo SQL produced (Example B-4 on page 236) uses 13 statements to
undo the changes caused by one SQL statement (shown in bold ...