Transaction control, PL-SQL Programming

Transaction Control

The Oracle is transaction oriented; that is, Oracle uses the transactions to make sure the data integrity. The transaction is a sequence of SQL data manipulation statements that does a logical unit of work. For illustration, the two UPDATE statements might credit one bank account and debit another.

At the same time, the Oracle makes permanent or undoes all the database changes made by a transaction. If your program fails in the middle of the transaction, the Oracle detects the error and rolls back the transaction. Therefore, the database is restored to its previous state automatically.

You use the ROLLBACK, COMMIT, SAVEPOINT, & SET TRANSACTION commands to control the transactions. The COMMIT makes everlasting and any database changes made during the present transaction. The ROLLBACK ends the present transaction and undoes any changes made as the transaction began. The SAVEPOINT marks the present point in the processing of a transaction. Used with the ROLLBACK, SAVEPOINT undoes part of a transaction. The SET TRANSACTION sets the transaction properties like the read/write access and isolation level.

Posted Date: 10/4/2012 3:38:43 AM | Location : United States







Related Discussions:- Transaction control, Assignment Help, Ask Question on Transaction control, Get Answer, Expert's Help, Transaction control Discussions

Write discussion on Transaction control
Your posts are moderated
Related Questions
Logical Connectives - SQL SQL's extended truth tables in which the symbol, for unknown, appears along with the usual T and F. Negation (NOT, ¬) Conjunction (

Parameter and Keyword Description: package_name: This construct identifies the package. AUTHID Clause: This determine whether all the packaged subprograms impleme

Many of the reports generated from the system calculate the total dollars in a shopper''s purchases. Follow these steps to create a function named TOT_PURCH_SF that accepts a shopp

Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

Question 1 . Compare SQL and PL/SQL Question 2 . Write a database trigger to implement the following check condition                          Given the following table

Table Literals - SQL One might expect SQL to support table literals in the manner illustrated in Example 2.2, but in fact that is not a legal SQL expression. Example: Not a

what is the use of declare keyword

Collections:   The collection is an ordered group of elements, all of similar type (for illustration, the grades for a class of students). Each element has an exclusive subsc