05 actualtestscom the power of knowing 1z0 147 return

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: NUMBER) IS v_sal NUMBER; tax NUMBER; BEGIN SELECT sal INTO v_sal FROM emp WHERE empno = p_no; tax := v_sal * 0.05; Actualtests.com - The Power of Knowing 1Z0-147 return (tax); END; Answer: B Explanation: Incorrect Answers A. A RETURN clause is only valid in a function C. Missing a RETURN clause in the executable section D. The header portion of the function is missing the RETURN keyword. QUESTION 91: Examine this code: CREATE OR REPLACE FUNCTION gen_email_name (p_first VARCHAR2, p_last VARCHAR2) RETURN VARCHAR2 IS v_email_name VARCHAR (19) ; BEGIN v_email_bame := SUBSTR(p_first, 1, 1) || SUBSRE(p_last, 1, 7) || RETURN v_email_name; END / Which two statements are true? A. This function is invalid. B. This function can be used against any table. C. This function cannot be used in a SELECT statement. D. This function can be used only if the two parameters passed in are not bull values. E. This function will generate a string based on 2 character values passed into the function. F. This function can be used only on tables where there is a p_first and p_last column. Answer: D, E Explanation: Answer D is a correct response. If any of the parameters passed in are null then the result will be null and the function will attempt to return a NULL value. Answer E This function concatenates the first character of the first name and the first seven characters of the last name which are passed in as parameters Actualtests.com - The Power of Knowing 1Z0-147 QUESTION 92: Examine the code examples. Which one is correct? A. CREATE OR REPLACE TRIGGER authorize_action BEFORE INSERT ON EMPLOYEES CALL log_exectution; / B. CREATE OR REPLACE TRIGGER authorize_action BEFORE EMPLOYEES INSERT CALL log_exectution; C. CREATE OR REPLACE TRIGGER authorize_action BEFORE EMPLOYEES INSERT CALL log_exectution; D. CREATE OR REPLACE TRIGGER authorize_action CALL log_exectution; BEFORE INSERT ON EMPLOYEES; / Answer: A Explanation: Answer A is the correct syntax for creating a Trigger and calling a procedure Incorrect answers: Answer B is incorrect. This is incorrect syntax for creating a Trigger Answer...
View Full Document

This document was uploaded on 03/08/2014.

Ask a homework question - tutors are online