Grant selectinsertupdatedelete on updteamstat to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: _STAT trigger on the TEAM table? A. GRANT SELECT, INSERT, UPDATE, DELETE ON TEAM TO PUBLIC; B. GRANT SELECT,INSERT,UPDATE,DELETE ON UPD_TEAM_STAT TO PUBLIC; C. GRANT EXECUTE ON TEAM TO PUBLIC D. GRANT SELECT, EXECUTE ON TEAM, UPD_TEAM_STAT TO PUBLIC; Answer: A QUESTION 74: Examine this code: CREATE OR REPLACE PROCEDURE set_bonus (p_cutoff IN VARCHAR2 DEFAULT 'WEEKLY' p_employee_id IN employees_employee_id%TYPE p_salary IN employees_salary%TYPE, p_bonus_percent IN OUT NUMBER DEFAULT 1.5, p_margin OUT NUMBER DEFAULT 2, p_bonus_value OUT NUMBER) IS BEGIN UPDATE emp_bonus SET bonus_amount =(p_salary * p_bonus_percent)/p_margin WHERE employee_id = p_employee_id; END set_bonus; / You execute the CREATE PROCEDURE statement above and notice that it fails. - The Power of Knowing 1Z0-147 What are two reasons why it fails? (Choose two) A. The syntax of the UPDATE statement is incorrect. B. You cannot update a table using a stored procedure. C. The format parameter p_bonus_value is declared but is not used anywhere. D. The formal parameter p_cutoff cannot have a DEFAULT clause. E. The declaration of the format parameter p_margin cannot have a DEFAULT clause. F. The declaration of the format parameter p_bonus_percent cannot have a DEFAULT clause. Answer: E, F Explanation: You can't assign a default value for the OUT and IN OUT parameters. Assigning a default value to an OUT or IN OUT parameter causes the following compilation error: PLS-00230: OUT and IN OUT formal parameters may not have default expressions Incorrect Answers A. There are no syntax errors on the Procedure. B. Updates in a Stored Procedure are allowed and are quite common. C. This parameter has a default value and the fact that it is not being used in the Procedure will not cause an error. QUESTION 75: Which three statements are true regarding database triggers? (Choose three) A. A database trigger is a PL/SQL block, C, or Java procedure associated with a table, view, schema, or the database. B. A d...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online