04 Try it yourself Interactive

Empty the same table three ways

The same three students from section 02, the same identity counter sitting at 4, and one statement per run: DELETE, TRUNCATE, DROP. Each run opens a transaction, removes the rows, and then tries to ROLLBACK. Watch four things: the rows, whether the table object survives, what happens to the counter, and whether the rollback brings anything back. Nothing plays on its own. Next, Back and Reset, or the arrow keys.

DELETE
3 rows · next sid 4
The table is the current contents of student. The three cards below it are the parts of the table that are not rows: the table object itself, its constraints and indexes, and its grants and triggers. Indigo marks the card this step touches.
Press Next to begin. Each press advances the run by one step.


      
Rows in student
Per-row log records
Next sid
Rollback restores
step 0 / 0