Skip to content

BEGIN

BEGIN;
SELECT * FROM Employees;
ROLLBACK;
Empty set

In this example, a transaction is initiated with BEGIN;. A query is then made to SELECT * FROM Employees; where all records from the ‘Employees’ table are requested. However, due to ROLLBACK;, all changes are reverted and the transaction nullified, hence the output is an Empty set.