This is an example to explain the powerful of the rollback and commit functions.Let's suppose you want to be sure that all queries have to be executed without errors before writing data on the database.Here's the code: