Controlling autonomous transactions, PL-SQL Programming

Controlling Autonomous Transactions

The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the other transaction. All the SQL statements executed as the last commit or rollback make up the present transaction. To control the autonomous transactions, use the statements shown below, that apply only to the present (active) transaction:

(i)COMMIT

(ii)ROLLBACK [TO savepoint_name]

(iii)SAVEPOINT savepoint_name

(iv)SET TRANSACTION

The COMMIT ends the present transaction and makes the permanent changes made during that transaction. The ROLLBACK ends the present transactions and undoes the changes made during that transaction. The ROLLBACK TO undo part of a transaction. The SAVEPOINT names and marks the present point in a transaction. The SET TRANSACTION sets the transaction properties like read/write access and isolation level.

Posted Date: 10/5/2012 4:49:31 AM | Location : United States







Related Discussions:- Controlling autonomous transactions, Assignment Help, Ask Question on Controlling autonomous transactions, Get Answer, Expert's Help, Controlling autonomous transactions Discussions

Write discussion on Controlling autonomous transactions
Your posts are moderated
Related Questions
Operators on Tables and Rows Row Extraction TUPLE FROM r, SQL has row subqueries. These are just like scalar subqueries except that they may specify more than one column.

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

Use the RETURNING Clause Frequently, the application requires information about the row affected by a SQL operation, for illustration, to produce a report or take a subsequent

Data Types in SQL SQL's concept does not differ significantly from that defined in the theory book, apart from that business concerning NULL. However, the theory book equates

Based on the EMPLOYEE table created in Assignment #1, write a PL/SQL anonymous block that accepts an employee ID from the user input and finds whether the employee ID is in the EMP

Database Values You can use the SELECT statement to have the Oracle assign values to a variable. For Each and every item in the select list, there must be a matching, type-compa

Updating Tables in SQL The topic of updating by describing the assignment operator, ":=" in Tutorial D. SQL uses a different syntax for assignment, using the key word SET and

Using Host Arrays The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the colle

Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

UNION without CORRESPONDING - SQL The use of UNION without CORRESPONDING. Example is merely by omitting CORRESPONDING, but only because the operands have identical SELECT clau