Skip to main content

1Z0-144 Real Exam Questions

Oracle Database 11g: Program with PL/SQL

106 questions available · Page 1 of 11

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Multiple choice

You want to maintain an audit of the date and time when each user of the database logs off.

Examine the following code:

Which two clauses should be used to fill in the blanks and complete the above code? (Choose two.)

  1. A

    ON SCHEMA

  2. B

    ON QRXABASE

  3. C

    AFTER LOGOFF

  4. D

    BEFORE LOGOFF

Show answer and explanation

Correct answers: B, D

Question 2 Single choice

Examine the following block of code:

Which line in the above code would result in errors upon execution?

  1. A

    line 5

  2. B

    line 8

  3. C

    line 2

  4. D

    line 7

Show answer and explanation

Correct answer: B

Question 3 Single choice

Examine the following code:

Which statement is true about the execution of the above code?

  1. A

    It executes and displays null.

  2. B

    It executes and the condition returns true.

  3. C

    It executes and control goes to the else statement.

  4. D

    It fails because no value is assigned to the v_myage variable.

Show answer and explanation

Correct answer: C

Question 4 Multiple choice

View the Exhibit and examine the structure of the EMP table.

Examine the following block of code:

Which stages are performed when the above block is executed? (Choose three.)

  1. A

    Bind

  2. B

    Parse

  3. C

    Fetch

  4. D

    Execute

Show answer and explanation

Correct answers: B, C, D

Explanation

References:
https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.dashdb.apdv.plsql.doc/doc/c0053844.html

Question 5 Single choice

View Exhibit 1 and examine the structure of the EMP and DEPT tables.

View Exhibit 2 and examine the trigger code that is defined on the DEPT table to enforce the UPDATE and DELETE RESTRICT referential actions on the primary key of the DEPT table.

What is the outcome on compilation?

  1. A

    It compiles and executes successfully.

  2. B

    It gives an error on compilation because it is not a row-level trigger.

  3. C

    It gives an error on compilation because the EXCEPTION section is used in the trigger.

  4. D

    It compiles successfully but gives an error on execution because it is not a row-level trigger.

Show answer and explanation

Correct answer: B

Question 6 Single choice

View Exhibit 1 and examine the structure of the EMP table.

View Exhibit 2 and examine the PIVSQL block of code.

What is the outcome?

  1. A

    It gives an error because the return type is not valid.

  2. B

    It gives an error because the record type is not defined within the function.

  3. C

    It gives an error because the function call in DBMS_OUTPUT. PUT__LINE is not valid.

  4. D

    It executes successfully and displays the names and salaries of all employees who earn the highest salary.

  5. E

    It executes successfully but does not display the names and salaries of all employees who earn the highest salary.

Show answer and explanation

Correct answer: E

Question 7 Multiple choice

View the Exhibit and examine the structure of the EMP table.

You want to create two procedures using the overloading feature to search for employee details based on either the employee name or employee number.

Which two rules should you apply to ensure that the overloading feature is used successfully? (Choose two.)

  1. A

    The procedures can be either stand-alone or packaged.

  2. B

    The procedures should be created only as packaged subprograms.

  3. C

    The procedures should be created only as stand-alone subprograms.

  4. D

    Each subprogram's formal parameters should differ in both name and data type.

  5. E

    The formal parameters of each subprogram should differ in data type but can use the same names.

Show answer and explanation

Correct answers: B, E

Question 8 Multiple choice

Identify situations in which the DBMS_SQL package is the only applicable method of processing dynamic
SQL. (Choose two.)

  1. A

    When a query returns multiple rows

  2. B

    When a column name in a where clause is unknown at compile time

  3. C

    When the number of columns selected in a query is not known until run time

  4. D

    When a table needs to be created based on an existing table structure at run time

  5. E

    When privileges need to be granted to a new user to access an existing schema at run time

Show answer and explanation

Correct answers: B, C

Question 9 Single choice

View the Exhibits and examine the structure of the EMPLOYEES, DEPARTMENTS AND EMP_BY_DEPT tables.

EMPLOYEES

DEPARTMENTS

EMP_BY_DEPT

Examine the following code:

What is the outcome on execution of the above code?

  1. A

    It executes successfully but the output statements show different values.

  2. B

    It executes successfully and both output statements show the same values.

  3. C

    It gives an error because the SQL%ROWCOUNT attribute cannot be used with BULK COLLECT.

  4. D

    It gives an error because the INSERT SELECT construct cannot be used with the FORALL

Show answer and explanation

Correct answer: A

Question 10 Single choice

/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 DIRECTION 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?

  1. A

    It goes into an infinite loop.

  2. B

    It executes successfully and displays only the list of faculty names.

  3. C

    It does not execute and displays an error message because the end-of-file condition is not taken care of.

  4. D

    It executes successfully and displays the list of faculty names followed by a "no data found" error message.

Show answer and explanation

Correct answer: D