Com the power of knowing 1z0 147 substrplastname 1 7

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: name, 1, 1) || - The Power of Knowing 1Z0-147 SUBSTR(p_last_name, 1, 7) || ''; 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. Answer: B • When called from a SELECT statement or a parallelized UPDATE or DELETE statement, the function cannot modify any database tables • When called from an UPDATE, or DELETE statement, the function cannot query or modify any database tables modified by that statement. • When called from a SELECT, INSERT, UPDATE, or DELETE statement, the function cannot execute SQL transaction control statements (such as COMMIT), session control statements (such as SET ROLE), or system control statements (such as ALTER SYSTEM). Also, it cannot execute DDL statements (such as CREATE) because they are followed by an automatic commit. • The function cannot call another subprogram that breaks one of the above restrictions. QUESTION 19: Which table should you query to determine when your procedure was last compiled? A. USER_PROCEDURES B. USER_PROCS C. USER_OBJECTS D. USER_PLSQL_UNITS Answer: C In the USER_OBJECTS there is - The Power of Knowing 1Z0-147 Incorrect Answers A. USER_PROCEDURES lists all functions and procedures, along with associated properties. For example, ALL_PROCEDURES indicates whether or not a function is pipelined, parall...
View Full Document

This document was uploaded on 03/08/2014.

Ask a homework question - tutors are online