阿摩線上測驗 登入

試題詳解

試卷:無年度 - Oracle ActualTests.1Z0-147.v2008-11-10.by.Ramon.111q#24548 | 科目:資料庫管理系統(AS2)

試卷資訊

試卷名稱:無年度 - Oracle ActualTests.1Z0-147.v2008-11-10.by.Ramon.111q#24548

科目:資料庫管理系統(AS2)

QUESTION 8 Examine this code: CREATE OR REPLACE FUNCTION gen_email_name (p_first_name VARCHAR2, p_last_name VARCHAR2, p_id NUMBER) RETURN VARCHAR2 is v_email_name VARCHAR2(19); BEGIN v_email_home := SUBSTR(p_first_name, 1, 1) || SUBSTR(p_last_name, 1, 7) || '@Oracle.com'; UPDATE employees SET email = v_email_name WHERE employee_id = p_id; RETURN v_email_name; END; You run this SELECT statement: SELECT first_name, last_name gen_email_name(first_name, last_name, 108) EMAIL FROM employees; What occurs?
(A) Employee 108 has his email name updated based on the return result of the function.
(B) The statement fails because functions called from SQL expressions cannot perform DML.
(C) The statement fails because the functions does not contain code to end the transaction.
(D) The SQL statement executes successfully, because UPDATE and DELETE statements are ignoring in stored functions called from SQL expressions.
(E) The SQL statement executes successfully and control is passed to the calling environment.
正確答案:登入後查看