04 Try it yourself Interactive

Eight statements, and one word that decides whether you can undo them

The same eight statements from section 03, run twice against the same two tables, with both tables shown after every statement and the count each one reports. Autocommit is the default in most clients: each statement commits itself the instant it returns. One transaction is the identical script with BEGIN typed first. Watch line 6, where the WHERE clause is missing, and then watch what the last line can and cannot do about it. Nothing plays on its own: Next, Back and Reset, or the arrow keys.

Autocommit
autocommit · nothing is undoable
Amber marks a row this statement wrote. Rose marks a row a statement could not remove, together with the row that blocked it. Green is every value the current statement left alone.
Press Next to begin. Each press runs one statement.


      
Rows in student
Rows this statement
Rollback would undo0
Rejected0
step 0 / 0