TRANSACTION and ROLLBACK : TRANSACTION ROLLBACK « Transaction « SQL / MySQL






TRANSACTION and ROLLBACK

Drop table Books;


CREATE TABLE Books
(
   ID SMALLINT NOT NULL PRIMARY KEY,
   Title VARCHAR(60) NOT NULL,
   Copyright YEAR NOT NULL
)
ENGINE=INNODB;



START TRANSACTION;
INSERT INTO Books VALUES (3, 'Angels', 1966);
INSERT INTO Books VALUES (4, 'Black', 1932);
ROLLBACK;


select * from Books;


           
       








Related examples in the same category

1.TRANSACTION and save point
2.ROLL Back to the save point