Last answered:

07 Sept 2023

Posted on:

13 Jan 2023

2

ROLLBACK execution!

In the video example, we changed the last_name from 'Winnfield' to 'Johnson' using the UPDATE statement and then used a COMMIT statement.
When we used a ROLLBACK statement, the video showed the last_name getting changed back to Winnfield.

Now my confusion is:
Later in the video, you defined ROLLBACK as the statement which reverts the changes back to the last non-committed state and in my opinion, the video shows the changes getting reverted back to the last committed state.

So I think the ROLLBACK statement shouldn't be able to revert back to 'Winfield'. So, one of us is wrong so please clarify.
image

1 answers ( 0 marked as helpful)
Posted on:

07 Sept 2023

1

I think you are right. It should stay as Johnson instead of reverting back to Winnfield since the change to Johnson was followed by a COMMIT.

Submit an answer