Skip to content

COMMIT

START TRANSACTION;
INSERT INTO employees (first_name, last_name)
VALUES ('John', 'Doe');
COMMIT;
Query OK, 1 row affected (0.02 sec)

In the provided example, a transaction is initiated by START TRANSACTION;. Then an INSERT statement is executed to add new records into the employees table. At the end, the COMMIT; statement is used to save all modifications made since the start of the transaction. The output corresponds to MySQL’s acknowledgment to the successful insertion of data.