Database-Oracle [3i Infotech Placement]: Sample Questions 71 - 73 of 132

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

Question 71

Oracle

Question

MCQ▾

SYSTEM. EFFECTIVE. DATE variable is

Choices

Choice (4)

a.

Write only

b.

Read only

c.

Read & Write

d.

Question does not provide sufficient data or is vague

Answer

a.

Explanation

  • The SYSTEM. EFFECTIVE. DATE variable is write only.
  • Enables to set the effective database date.

Question 72

Oracle

Question

MCQ▾
  1. Declare
  2. anumber := 5;
  3. bnumber := null;
  4. cnumber := 10;
  5. Begin
  6. if
  7. a >bANDa <c
  8. then
  9. a := c ⚹a;
  10. endif;
  11. End;

What will be the value of ‘a’ after execution?

Choices

Choice (4)

a.

5

b.

50

c.

NULL

d.

None of the above

Answer

a.

Explanation

NULL values cannot be compared like normal values, a comparison with null always returns false and hence the value of ‘a’ remains unmodified.

Question 73

Oracle

Question

MCQ▾

A Transaction ends

Choices

Choice (4)

a.

Only when it is Committed

b.

Only when it is Rolledback

c.

When it is Committed or Rolledback

d.

Question does not provide sufficient data or is vague

Answer

c.

Explanation

  • A Transaction ends when it is committed or rolledback

A Transaction

  • A logical unit of work- contains one or more SQL statement
  • An atomic unit.
  • Begins with the first executable SQL statement.
  • Explicit transaction starts with the BEGIN TRANSACTION statement and end with the COMMIT or ROLLBACK statement.
  • Lasts until it completes without errors- COMMIT transaction is issued to make modifications of the database, all modifications are erased with a ROLLBACK transaction statement.
  • The COMMIT means the changes made in the current transaction are made permanent.
  • A ROLLBACK statement cancels all modifications made by the current transaction.
  • Both COMMIT and ROLLBACK release all InnoDB locks set during the current transaction.

Developed by: