The ROLLBACK Statement
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 (101, 'Notebook', 1934);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO Books VALUES (102, 'C++', 1919);
Query OK, 1 row affected (0.00 sec)
mysql> ROLLBACK;
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