21) Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?
1. When the transaction is committed 2. During the data manipulation statement
3. When an Oracle supplied package references thetrigger
4. During a data manipulation statement and when thetransaction is committed
22) Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?
1. DBMS_DISPLAY 2. DBMS_OUTPUT 3. DBMS_LIST 4. DBMS_DESCRIBE
23) What occurs if a procedure or function terminates with failure without being handled? 1. Any DML statements issued by the construct arestill pending and can be committed or rolled back.
2. Any DML statements issued by the construct arecommitted
3. Unless a GOTO statement is used to continueprocessing within the BEGIN section, the constructterminates.
4. The construct rolls back any DML statements issuedand returns the unhandled exception to the callingenvironment.
24) Examine this code BEGIN theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;
END; Q) For this code to be successful, what must be true?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.
25) 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 thisfeature?
1. DBMS_DDL
2. DBMS_DML
3. DBMS_SYN
4. DBMS_SQL