Skip to content

START

START TRANSACTION;
CREATE TABLE test (id INT, name VARCHAR(255));
INSERT INTO test (id, name) VALUES (1, 'Mark');
COMMIT;
Query OK, 0 rows affected (0.04 sec)
Query OK, 1 row affected (0.01 sec)

The START TRANSACTION statement initiates a new transaction. Inside that transaction, a new table test is created and a row is inserted into it. The changes are then made permanent with the COMMIT statement.