Check out example codes for "rollback to savepoint sql". It will help you in understanding the concepts better.

Code Example 1

-- Creating savepoints
SAVEPOINT SAVEPOINT_NAME;

-- Rollback to save point
ROLLBACK TO SAVEPOINT_NAME;

Learn ReactJs, React Native from akashmittal.com