Which two statements are true?

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) ||
SUBSTR(p_last, 1, 7) ||
RETURN v_email_name;
END;
/
Which two statements are true? Select two.

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) ||
SUBSTR(p_last, 1, 7) ||
RETURN v_email_name;
END;
/
Which two statements are true? Select two.

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 null 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.

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



Leave a Reply 2

Your email address will not be published. Required fields are marked *


khusru

khusru

The function will retrun compilation errors as the string statement is not closed.