Controlling autonomous transactions, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Controlling autonomous transactions

Loop statements, LOOP Statements The LOOP statements execute a series o...

LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ

Avoiding collection exceptions, Avoiding Collection Exceptions   In ma...

Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Update command- sql, UPDATE Command- SQL Loosely speaking, UPDATE chan...

UPDATE Command- SQL Loosely speaking, UPDATE changes some of the column values of some existing rows of its target table. Thus, although some rows disappear from the target an

Table represents an extension - sql, Table Represents an Extension - SQL ...

Table Represents an Extension - SQL It describes how each tuple in a relation represents a true instantiation of some predicate and each true instantiation is represented by s

Example of when or then constraints - sql, Example of WHEN or THEN Constrai...

Example of WHEN or THEN Constraints A concrete example showing how SQL supports WHEN/THEN constraints CREATE TABLE SAL_HISTORY (EmpNo CHAR (6), Salary INTEGER NOT NULL,

Out mode - parameter modes, OUT Mode An OUT parameter returns values t...

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

Explicitly specifying the join condition - sql, Explicitly specifying the j...

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

Oracle PL SQL, I need to write one function and one procedure to query a Or...

I need to write one function and one procedure to query a Oracle 10.1 DB using PL SQL. I have the schema and exact queries...along with work Ive started and a template to put the a

Using a host variable, Using a Host Variable You can declare the curso...

Using a Host Variable You can declare the cursor variable in the PL/SQL host environment like an OCI or Pro C program. To use the cursor variable, you should pass it as a host

Restriction and and - sql, Restriction and AND - SQL Restriction is av...

Restriction and AND - SQL Restriction is available via the WHERE operator, and so it is in SQL. However, by Example showing how a certain simple restriction can be expressed u

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd