Oracle PL/SQL Fundamentals

Wednesday, December 31, 2008

Scenario : You are in the process of issuing several UPDATE statements within a single transaction. During this transaction, an update fails and you issue a rollback.
Given the scenario described above, what happens to the database?
Choice 1 : A transaction is valid ONLY for INSERT statements; therefore, all UPDATE statements will be written to the database.
Choice 2 : The database retries the failed UPDATE statement one more time and undoes its action if it fails again.
Choice 3 : The successful UPDATE statements are permanently written to the database. The last UPDATE did not get committed and was rolled back.
Choice 4 : All UPDATE statements within the transaction are rolled back and the database is consistent with its state before the transaction.
Choice 5 : All data is reverted to the state the database was in when it was first started.
===================================================================

Scenario : You are using an IF-THEN-ELSIF-ELSE-END IF statement, and all the conditions specified evaluate to NULL.
Given the scenario described above, which one of the following statements is executed?
Choice 1 : One of the ELSIF parts
Choice 2 : The NULL value handler
Choice 3 : The ELSE part
Choice 4 : The divide by zero exception handler
Choice 5 : The IF part
==================================================================

Scenario : There is a package named UTILPKG, which contains 84 procedures and 16 functions.

Referring to the scenario above, when you call a function UTILPKG.file_rename, which one of the following fully describes what is loaded into memory?

Choice 1 : Both the function specification and definition for UTILPKG.file_rename and dependencies in UTILPKG are loaded.
Choice 2 : Both the entire package specification and body for UTILPKG are loaded.
Choice 3 : Only the function definition for UTILPKG.file_rename and its dependencies, if UTILPKG.file_rename has cursor references in the specification, is loaded.
Choice 4 : Only the function definition for UTILPKG.file_rename
Choice 5 : Only the function specification for UTILPKG.file_rename
===========================================================================================
Scenario : You have the following string:

This is a test. This is only a test.
You want to replace every occurrence of the word test with the word trial.

Given the scenario described above, which one of the following commands do you use to accomplish this?
Choice 1 : 'This is a test. This is only a test.' =~ s/test/trial/g
Choice 2 : 'This is a test. This is only a test.' =~ s/test\./trial\./
Choice 3 : SUBSTR('This is a test. This is only a test.','test','trial')
Choice 4 : REPLACE('This is a test. This is only a test.', 'test','trial')
Choice 5 : UPDATE('This is a test. This is only a test.' set 'test','trial')
==================================================================

Which one of the following is a data definition language (DDL) command?
Choice 1 : INSERT
Choice 2 : TRUNCATE
Choice 3 : DELETE
Choice 4 : SELECT
Choice 5 : UPDATE
===============================================================
Oracle stores P-code in the database for which one of the following structures?
Choice 1 : Indexes
Choice 2 : Named PL/SQL blocks
Choice 3 : ODBC clients
Choice 4 : Object relational models
Choice 5 : Anonymous PL/SQL blocks
===============================================================

Post a Comment

Chitika

About This Blog

Followers

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP