From: msdn Forum posts
Create a test table testtable,
Insert the following two rows of data:
Insert
Into testtable values
(1,
'Aaa ')
Insert
Into testtable values
(2,
'Bbbbb ')
Then, perform the following operations.
Update testtable
Set myname =
'Cccc' where myid
= 2
To be more intuitive, we can use some logging tools such as apexsql log (from Ctrl + click the following link "href =" http://www.apexsql.com/"> http://www.apexsql.com/
Can be downloaded to observe the log structure.
At this time, we can see that the update statement contains oldvalue and newvalue. Therefore, when performing rollback, because of oldvalue, the so-called restoration is to change the value back to oldvalue.
At the same time, we can also see the corresponding undo script.
And redo script:
Only records oldvalue and newvalue, rather than record the entire oldpage and Newpage corresponding to that value.