1z0-144: Oracle Database 11g Program with PLSQL Examine Practice Questions
The free 1z0-144: Oracle Database 11g Program with PLSQL questions that deal with examine, with answers and explanations. The full bank and the timed practice test cover every topic the exam asks about.
Question #4
Examine the following PL/SQL code: Which statement is true about the fetch statements in the PL/SQL code?

Correct answer: B
Explanation
An explicit cursor keeps its position, so each FETCH returns the next consecutive row of the active set and assigns it to the target variables; the cursor need not be closed and reopened between fetches.
Question #5
View the Exhibit and examine the code. Why does the code give an error on execution?

Correct answer: A
Explanation
word_list is a formal parameter of the nested procedure add_entry, so it is out of scope in the main block of procedure wording; referencing word_list.word there fails. lexicon, declared in the enclosing procedure, is visible inside add_entry.
Question #6
View the Exhibit to examine the PL/SQL code. The record for the employee with employee_id 100 in the employees table is as follows: Identify the correct output for the code.


Correct answer: C
Explanation
v_sal is set to v_minsal (default 1000) + 500 = 1500 and v_hire_date is explicitly assigned SYSDATE before the output, while last_name comes from the row fetched into v_rec1, so the output is King, the current sysdate and 1500.
Question #7
/temp/my_files is an existing folder in the server, facultylist.txt is an existing text file in this folder. Examine the following commands that are executed by the DBA: SQL>CREATE DIRECTORY my_dir AS ‘/temp/my_files’; SQL>GRANT READ ON DIRECTORY my_dir TO public; View the Exhibit and examine the procedure created by user SCOTT to read the list of faculty names from the text file. SCOTT executes the procedure as follows: SQL>SET SERVEROUTPUT ON SQL>EXEC read_file (‘MY_DIR’, ‘FACULTYLIST.TXT’) What is the outcome?

Correct answer: D
Explanation
UTL_FILE.GET_LINE raises NO_DATA_FOUND at end of file, so a read loop without a handler prints every faculty name and then terminates with the unhandled no data found error.
Question #8
View the exhibit to examine the PL/SQL code. Which statement is true about the exception handlers in the PL/SQL code?

Correct answer: B
Explanation
The block's EXCEPTION section handles the predefined NO_DATA_FOUND exception, so a no data found error raised by either SELECT INTO is trapped; other exceptions are not, and control does not return to the statement after the failing SELECT.
Question #9
Examine the following PL/SQL code: The server output is on for the session. Which statement is true about the execution of the code?

Correct answer: A
Explanation
A cursor FOR loop implicitly declares the record variable, opens the cursor, fetches each row and closes it when the loop ends, so no explicit declaration, OPEN or EXIT is needed and the block runs as intended.
Question #10
Examine the following PL/SQL code; The execution of the code produces errors. Identify the error in the code.

Correct answer: D
Explanation
A cursor FOR loop implicitly declares its own record index and handles OPEN, FETCH and EXIT itself; the loop index must be an identifier such as emp_record, so declared variables emp_name and emp_job cannot be used in the FOR clause.
Continue with 1z0-144: Oracle Database 11g Program with PLSQL
Unlock the full question bank
You have read the first 10 questions. A subscription opens every question in 1z0-144: Oracle Database 11g Program with PLSQL, the full timed practice test, and your progress and weak-topic reporting.
Single exam
$19.99for 30 days
Full question bank and practice test for one exam, for 30 days.
Single exam
$49.99for 1 year
One exam for a full year. Nothing renews and nothing to cancel.
Full access
$39.99/mo
Every exam in the catalogue, month to month.
Full access
$199.99/yr
Every exam in the catalogue for a year.
Already subscribed? Sign in to pick up where you left off.
All 1z0-144: Oracle Database 11g Program with PLSQL practice questions →
