Set - 5

Question 6 :

Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?

Answer :

1. When the transaction is committed
2. During the data manipulation statement
3. When an Oracle supplied package references the trigger
4. During a data manipulation statement and when the transaction is committed


Question 7 :

Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?

Answer :

1. DBMS_DISPLAY
2. DBMS_OUTPUT
3. DBMS_LIST
4. DBMS_DESCRIBE


Question 8 :

Examine this code

Answer :

BEGIN
theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;
END;


Question 9 :

For this code to be successful, what must be true?

Answer :

1. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist only in the body of the THEATER_PCK package.
2. Only the GET_TOTAL_FOR_YEAR variable must exist in the specification of the THEATER_PCK package.
3. Only the V_TOTAL_SEATS_SOLD_OVERALL variable must exist in the specification of the THEATER_PCK package.
4. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist in the specification of the THEATER_PCK package.


Question 10 :

A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable this feature?

Answer :

1. DBMS_DDL
2. DBMS_DML
3. DBMS_SYN
4. DBMS_SQL