Database [3i Infotech Placement]: Sample Questions 269 - 269 of 294

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 269

Database

Question

MCQ▾

Is it possible to use Transactional control statements in Database Triggers?

Choices

Choice (4)

a.

Yes

b.

No

c.

All of the above

d.

None of the above

Answer

b.

Explanation

Understanding of Database Trigger
  • It is not possible.
  • Triggers are defined for each table, if we use COMMIT of ROLLBACK in a trigger, it affects logical transaction processing.
  • However, we can use TCL command in Autonomous Triggers.

Autonomous Transaction

  • Autonomous transaction is a feature of oracle which maintains the state of its transactions and saves it for commit or rollback transaction.
  • Defined using the trigger beggining with Pragma autonomus _trancation and the trigger commit or rollback statment at the end of the trigger.

TCL (Transaction Control Language)

  • Commands are used to manage transactions in database.
  • Used to manage the changes made by DML statements.
  • Allows statements to be grouped together into logical transactions. Commit command:
  • Is used to permanently save any transaction into database.
  • Syntax of commit command: commit; Rollback command:
  • Restore the database to last commited state.
  • Use with save point command to jump to a save point in a transaction.
  • Syntax of rollback command- Rollback to save point-name;

Developed by: