Only local or packaged subprograms can be overloaded

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: h two statements about the overloading feature of packages are true? (Choose two) A. Only local or packaged subprograms can be overloaded. B. Overloading allows different functions with the same name that differ only in their return types. C. Overloading allows different subprograms with the same number, type and order of parameters. D. Overloading allows different subprograms with the same name and same number or type of parameters. E. Overloading allows different subprograms with the same name, but different in either number, type or order of parameters. Answer: A, E Explanation: A Only local or packaged subprograms, or type methods, can be overloaded. You cannot overload standalone subprograms E The Subprograms within the package must have formal parameters that differ in number, data type, or the order of parameters. Incorrect Answers B You cannot overload two functions with the same name that differ only in their return data type. C & D The Subprograms within the package must have formal parameters that differ in number, data type, or the order of parameters. www.ExamMagic.com 1Z0-147 WWW.ExamMagi c.COM - 78: All users currently have the INSERT privilege on the PLAYER table. You only want your users to insert into this table using the ADD_PLAYTER procedure. Which two actions must you take? (Choose two) A. CRANT SELECT ON ADD_PLAYER TO PUBLIC; B. CRANT EXECTUE ON ADD_PLAYER TO PUBLIC; C. CRANT INSERT ON PLAYER TO PUBLIC; D. CRANT EXECTUE INSERT ON ADD_PLAYER TO PUBLIC; E. REVOKE INSERT ON PLAYER FROM PUBLIC; Answer: B, E Explanation: B. You must provide the users with EXECUTE privilege to the procedure. E. You want to restrict access to the underlying table so you REVOKE the INSERT privilege to PUBLIC. Incorrect Answers A. You can't GRANT the SELECT privilege to a procedure C. Users already have this privilege, you want to REVOKE this privilege. D. You can't GRANT an INSERT privilege to a procedure, the EXECUTE privilege is correct. WWW.ExamMagic.COM - 79: When creating a function, in which section will you typically find the RETURN keyword? A. HEADER only B. DECLARATIVE C. EXECUTABLE and HEADER D. DECLARATIVE,EXECUTABLE and EXCEPTION HANDLING Answer: C Explanation: The header of the function contains the RETURN keyword and identifies the data type that needs to be returned to the calling block. The RETURN statement in the executable www.ExamMagic.com 1Z0-147 section of the function performs the actual returning of the value. The header section defines the return data type of the value and the executable section does the actual returning. Incorrect Answers A. You need a RETURN Statement in the EXECUTABLE section as well. B. You will not find a RETURN in the declaration section. D. You will not find a RETURN statement in either section.. WWW.ExamMagic.COM - 80: A dependent procedure or function directly or indirectly references one or more of which four objects? (Choose four) A. view B. sequence C. privilege D. procedure E. anonymous block F. packaged procedure or function Answer: A, B, D, F Explanation: Procedure and function can either directly or indirectly refer to the following objects.Tables,Views,Sequences,Procedures,Functions, Packaged procedures and functions Incorrect Answers C. Procedures and functions can't refer to a privilege. E. An anonymous block is not a stored program unit therefore it can't be referred to. WWW.ExamMagic.COM - 81: Which three are true regarding error propagation? (Choose three) A. An exception cannot propagate across remote procedure calls. B. An exception raised inside a declaration immediately propagates to the current block. C. The use of the RAISE; statement in an exception handler reprises the current exception. D. An exception raised inside an exception handler immediately propagates to the enclosing block. www.ExamMagic.com 1Z0-147 Answer: A, C, D Explanation: A. Exceptions cannot propagate across remote procedure calls (RPCs). Therefore, a PL/SQL block cannot catch an exception raised by a remote subprogram. For a workaround, see "Defining Your Own Error Messages: Procedure RAISE_APPLICATION_ERROR". C. To reraise an exception you place a RAISE statement in the local exception handler. D. When an exception is raised, the control is passed to the exception-handling section. The control is never transferred back to the executable section after the exception is handled rather it propagates to the enclosing block. Incorrect Answer B. As a rule of thumb, exceptions are declared in the declarative section, raised in the executable section, and handled in the exception-handling section. When an exception is raised, the control is passed to the exception-handling section WWW.ExamMagic.COM - 82: Which two tables or views track object dependencies? (Choose two) A. USER_DEPENDENCIES B. USER_IDEPTREE C. IDEPTREE D. USER_DEPTREE E. USER_DEPENDS Answer: A, C Explanation: A. The data dictionary view USER_DEPENDENCIES displays information about all direct dependencies within...
View Full Document

Ask a homework question - tutors are online