1z0-144 Oracle Database 11g: Program with PL/SQL

Loading demo links...

Showing 7–9 of 10 questions

Question 7

In which of the following scenarios would you recommend using PL/SQL records?

Select an option, then click Submit answer.

  • when you want to retrieve an entire row from a table and perform calculations

  • when you know the number of elements in advance and the elements are usually accessed sequentially

  • when you want to create a separate lookup table with multiple entries for each row of the main table, and access it through join queries

  • when you want to create a relatively small lookup table, where the collection can be constructed in memory each time a subprogram is invoked

Question 8

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

View Exhibit 2 and examine the code.

What is the outcome when the code is executed?

Select an option, then click Submit answer.

  • Both blocks compile and execute successfully when called.

  • Both blocks compile successfully but the CALC_SAL procedure gives an error on execution.

  • The CALC_SAL procedure gives an error on compilation because the amt variable should be declared in the RAISE_SALARY procedure.

  • The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY procedure cannot call the stand-alone increase function.

Question 9

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?

Select an option, then click Submit answer.

  • It executes successfully but the output statements show different values.

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

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

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