1Z0-144 | The Secret of Oracle 1Z0-144 dumps


Q21. Which statements are true about the WHEN OTHERS exception handler? (Choose all that apply) 

A. It can be the first exception handler. 

B. It can be the only exception handler for the code. 

C. It traps all the exceptions that are not already trapped. 

D. You can have multiple OTHERS clauses to trap all the multiple unhandled exceptions. 

Answer:

Explanation: Reference: 

http://www.techonthenet.com/oracle/exceptions/when_others.php 

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

Examine the following block of code: 

What is the outcome when the above code is executed? 

A. It executes successfully. 

B. It gives an error because decode cannot be used in a PL/SQL block. 

C. It gives an error because the AVG function cannot be used in a PL/SQL block 

D. It gives an error because the MONTHS_BETWEEN function cannot be used in a PL/SQL block. 

E. It gives an error because both the AVG and decode functions cannot be used in a PL/SQL block. 

Answer:

Q23. Examine the following snippet of PL/SQL code: 

View the exhibit for table description of EMPLOYEES table. The EMPLOYEES table has 200 rows. 

Identify open statement for opening the cursor that fetches the result as consisting of employees with JOB_ID as ‘ST_CLERK’ and salary greater than 3000. 

A. OPEN c1 (NULL, 3000); 

B. OPEN c1 (emp_job, 3000); 

C. OPEN c1 (3000, emp_salary); 

D. OPEN c1 (‘ST_CLERK’, 3000) 

E. OPEN c1 (EMP_job, emp_salary); 

Answer:

Q24. You want to create a trigger that fires whenever rows are deleted from the customer table and that displays the number of rows remaining in the table. 

Which two statements are correct about the trigger to be created for the above requirement? (Choose two.) 

A. It should be an after trigger. 

B. It should be a before trigger. 

C. It should be a row-level trigger. 

D. It should be a statement-level trigger. 

E. It can be a before or an after trigger. 

Answer: A,C 

Q25. Which statements correctly describe the features of functions and procedures? (Choose all that apply.) 

A. A procedure can contain a return statement without a value. 

B. A function can return multiple values using a single return clause, 

C. A procedure can be executed as part of a SQL expression or as a PL/SQL statement, 

D. A function can contain zero or more parameters that are transferred from the calling environment. 

Answer:

Explanation: Reference: http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm (using the return statement) 

Q26. 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.) 

A. The procedures can be either stand-alone or packaged. 

B. The procedures should be created only as packaged subprograms 

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

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

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

Answer: B,E 

Q27. Which two statements are correct about the usage of parameters in functions? (Choose two.) 

A. Functions can have only in mode parameters. 

B. Functions called in SQL statements cannot have out or in out mode parameters. 

C. Functions having in, out, or in out parameters can be called only in named PL/SQL subprograms 

D. Functions having in, out, or in out parameters can be called In PL/SQL procedures and anonymous blocks. 

Answer: B,D 

Q28. View the Exhibit and examine the structure of the SALGRADE table. 

Examine the following code: 

What is the outcome? 

A. It is created successfully. 

B. It gives an error because the return clause condition is invalid. 

C. It gives an error because the usage of the host variables is invalid. 

D. It gives an error because the data type of the return clause is invalid. 

Answer:

Q29. You execute the following block of code: 

Which statement is true about the outcome? 

A. Both Output statements show different values. 

B. Both output statements show exactly the same values. 

C. It gives an error because the nested blocks are not labeled. 

D. It gives an error because the V_CUSTOMER variable have different types in the nested blocks 

Answer:

Q30. Which two statements are true about statement-level and row-level triggers? (Choose two.) 

A. A row trigger fires once even if no rows are affected. 

B. A statement trigger fires once even if no rows are affected. 

C. Row triggers are useful if the trigger action depends on the data of rows that are affected or on data that is provided by the triggering event itself. 

D. Statement triggers are useful if the trigger action depends on the data of rows that are affected or on data that is provided by the triggering event itself. 

Answer: B,C