143743864-Plsql-Oracle-Quiz-s9.pdf - SECTION 9 LESSON 1 1 What will happen when the following subprogram is compiled PROCEDURE at_proc IS PRAGMA

143743864-Plsql-Oracle-Quiz-s9.pdf - SECTION 9 LESSON 1 1...

This preview shows page 1 - 3 out of 14 pages.

SECTION 9 LESSON 1 1. What will happen when the following subprogram is compiled? PROCEDURE at_proc ISPRAGMA AUTONOMOUS_TRANSACTION;dept_id NUMBER := 90; BEGIN UPDATE ... INSERT ... END at_proc; Mark for Review (1) Points The subprogram will fail because it is missing AUTHID CURRENT_USER before IS. The autonomous transaction subprogram will fail because it must include COMMIT or ROLLBACK. (*) The compilation will fail because a semicolon after AUTONOMOUS_TRANSACTION is not needed. The program will compile successfully. Incorrect. Refer to Section 9 Lesson 6. 2. To create a function successfully, the following steps should be performed: What is the correct order to perform these steps? Correct 3. An autonomous transaction subprogram may be in the same package as the calling subprogram or may be in a separate subprogram. True or False? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 9 Lesson 6.
Image of page 1
4. Which of the following is found in a function and not a procedure? Mark for Review (1) Points 5. The following function has been created: CREATE OR REPLACE FUNCTION find_sal (p_emp_id IN employees.employee_id%TYPE) RETURN NUMBER IS ... We want to invoke this function from the following anonymous block: DECLARE v_mynum NUMBER(6,2);v_mydate DATE;BEGIN... Line AEND;Which of the following would you include at Line A? Mark for Review (1) Points find_sal(100,v_mynum); v_mynum := find_sal(100); (*) v_mydate := find_sal(100); find_sal(v_mynum,100); Correct 6. You have created a function called GET_COUNTRY_NAME which accepts a country_id as an IN parameter and returns the name of the country. Which one of the following calls to the function will NOT work?
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 14 pages?

  • Fall '18
  • Muhamad Hamdani
  • Return statement, Control flow

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture