mysql delete undo code example
Example: mysql undo delete
start transaction;
savepoint sp1;
delete from customer where ID=1;
savepoint sp2;
delete from customer where ID=2;
rollback to sp2;
rollback to sp1;
start transaction;
savepoint sp1;
delete from customer where ID=1;
savepoint sp2;
delete from customer where ID=2;
rollback to sp2;
rollback to sp1;