Nextval pdeptname plocation end adddept which three

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: eq.NEXTVAL, p_dept_name, p_location); END add_dept; / Which three are valid calls to the add_dep procedure? (Choose three) A. add_dept; B. add_dept('Accounting'); C. add_dept(, 'New York'); D. add_dept(p_location=>'New York');. Answer: A,B,D A is correct because both of the parameter have a default values. B is correct because here we call the procedure using position notation, and the first parameter for the procedure will have the value 'Accounting', and since the second - The Power of Knowing 1Z0-147 parameter has a default value then we can skip it, and in this case it will take the default value. D is correct because here we are calling the procedure using naming notation, the value 'New York' will go to the parameter p_location, and the parameter p_dept_name will have the default value. The following table list the for passing parameters to a procedure: Incorrect Answer C: You can't use this way and assume that the PL/SQL will understand that he should assign the default value for the first parameter. This is incorrect way for calling. QUESTION 5: Which two statements about packages are true? (Choose two) A. Packages can be nested. B. You can pass parameters to packages. C. A package is loaded into memory each time it is invoked. D. The contents of packages can be shared by many applications. E. You can achieve information hiding by making package constructs private. Answer: D,E Actually theses are some of the advantages of the package, sharing the package among applications and hide the logic of the procedures and function that are inside the package by declaring them in the package header and write the code of these procedures and functions inside the package body. Incorrect Answers: A: Packages can not be nested B: Parameters can't be passed to a package; parameters can be passed to procedures and functions only. C: By the first time you call a procedure, function, or reference a global variable within the package, the whole package will be loaded into the memory and stay there, so when ever you need to reference any of the package's constructs again you will find it in the mem...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online