PL/SQL Transactions   «Prev  Next»

Commit Rollback - Exercise

COMMIT, ROLLBACK, and SAVEPOINT commands

Course project: Add transaction controls to a package.

Objective: Add transaction controls to your package

Exercise scoring

This exercise is worth 10 points. You will be graded on the placement of transaction controls in the package that you created in the previous module. When you complete your answer, submit your answer.

Background | Overview

The package you created in the previous module is called DO_FINAL_SALE, or something similar. It contains an update to the CUSTOMER_SALE table. Your task in this exercise is to add transaction controls (COMMIT and ROLLBACK) at the appropriate locations in the package.

Download files

None.

Instructions

Work in your own PC editor on the package you created in the previous module. Add transaction controls so that the transaction is committed if no errors are encountered and rolled back if any errors are encountered.

Hints

Look at the Slide Showin this lesson for examples of where to place the COMMIT and ROLLBACK commands.

Submitting your Exercise

Copy your entire package body code into the text box below. Click the Submit button to submit your answers to the course tutors.
You must submit all your responses to this exercise at once.