TRANSATIONAL CONTROL LANGUAGE (T.C.L):
A transaction is a logical unit of work. All changes made to the database can be referred to as a transaction. Transaction changes can be mode permanent to the database only if they are committed a transaction begins with an executable SQL statement & ends explicitly with either role back or commit statement.
1. COMMIT: This command is used to end a transaction only with the help of the commit command transaction changes can be made permanent to the database.
2. SAVE POINT: Save points are like marks to divide a very lengthy transaction to smaller once. They are used to identify a point in a transaction to which we can latter role back. Thus, save point is used in conjunction with role back.
; SAVE POINT ID
Example: SQL>SAVE POINT xyz;
3. ROLE BACK: A role back command is used to undo the current transactions. We can role back the entire transaction so that all changes made by SQL statements are undo (or) role back a transaction to a save point so that the SQL statements after the save point are role back.
Syntax: ROLE BACK( current transaction can be role back)
ROLE BACK to save point ID;
Example: SQL>ROLE BACK;
SQL>ROLE BACK TO SAVE POINT xyz;