Skip to content

RELEASE

START TRANSACTION;
INSERT INTO students (first_name, last_name)
VALUES ('John', 'Doe');
RELEASE;
Query OK, 1 row affected (0.01 sec)

A START TRANSACTION statement is used which opens a new transaction. An INSERT statement is used next inside the transaction, which adds a new row to the students table. The RELEASE statement commits the transaction, which causes the changes to become permanent.