Sie sind auf Seite 1von 2

Test: Quiz: Using Parameters in Procedures 1.

What is the correct syntax to create procedure MYPROC that accepts two number parameters X and Y? Mark for Review (1) Points CREATE PROCEDURE myproc (x NUMBER, y NUMBER) IS ... (*) CREATE PROCEDURE (x NUMBER, y NUMBER) myproc IS ... CREATE PROCEDURE myproc IS (x NUMBER, y NUMBER) ... CREATE PROCEDURE IS myproc (x NUMBER, y NUMBER) ?

Correct 2. What is the purpose of using parameters with stored procedures? Mark for Review (1) Points They prevent the procedure from modifying data in the database. They allow values to be passed between the calling environment and the p rocedure. (*) They count the number of exceptions raised by the procedure. They speed up the execution of the procedure.

Correct 3. Which of the following best describes the difference between a paramete r and an argument? Mark for Review (1) Points They are both names of variables. A parameter is passed into the procedu re, while an argument is passed out of the procedure A parameter is the name of a variable, while an argument is the datatype of that variable A parameter is the name of a variable that is passed into or out of a pr ocedure, while an argument is the value of that variable (*)

There is no difference, parameters and arguments are the same thing

Correct 4. Which of the following can be used as an argument for a procedure param eter? Mark for Review (1) Points The name of a variable. A literal value. An expression. All of the above. (*) None of the above.

Correct 5. A procedure has been created as: CREATE PROCEDURE myproc (p_left NUMBER, p_right NUMBER) IS BEGIN .... You want to call the procedure from an anonymous block. Which of the following c alls is valid? Mark for Review (1) Points myproc(p_left, p_right); myproc(v_left, v_right); myproc(v_left, 30); All of the above. (*)

Incorrect. Refer to Section 8 Lesson 2.

Das könnte Ihnen auch gefallen