Check out example codes for "mysql undo delete". It will help you in understanding the concepts better.
Code Example 1
start transaction; savepoint sp1; delete from customer where ID=1; savepoint sp2; delete from customer where ID=2; rollback to sp2; rollback to sp1;
Learn ReactJs, React Native from akashmittal.com