Create a savepoint with a name.
mysql>
mysql> CREATE TABLE Books
-> (
-> BookID SMALLINT NOT NULL PRIMARY KEY,
-> BookTitle VARCHAR(60) NOT NULL,
-> Copyright YEAR NOT NULL
-> )
-> ENGINE=INNODB;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO Books VALUES (103, 'Opera', 1966);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO Books VALUES (104, 'Sql Server', 1932);
Query OK, 1 row affected (0.00 sec)
mysql> SAVEPOINT sp1;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> drop table Books;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category