Question

Examine the following code: CREATE OR REPLACE PROCEDURE update_emp (v_name VARCHAR2, v_increment emp.salary%TYPE DEFAULT 5000) IS...

Examine the following code:

CREATE OR REPLACE PROCEDURE update_emp

(v_name VARCHAR2, v_increment emp.salary%TYPE DEFAULT 5000)

IS

BEGIN

UPDATE emp

SET

salary = salary + v_increment

WHERE first_name = v_name;

END update_emp;

Which statements will successfully invoke the update_emp  procedure from a package? (Choose all that apply.)

a.

update_emp();

b.

update_emp('William');

c.

update_emp('Amy',1200);

d.

update_emp(2000,'John');

e.

update_emp(v_name=>'Eric',1600);

f.

update_emp(v_increment=>2500);

g.

update_emp(v_name='Adam', v_increment=2500);

Which type of construct should you create to return a value without the need for any output arguments?

a.

view

b.

function

c.

procedure

d.

packaged procedure

  1. You granted user Joe the INDEX and REFERENCES privileges on the INVENTORY table. Which statement did you use?

    A.
    GRANT ALL
    ON inventory 
    TO joe;
    B.
    GRANT ANY PRIVELEGE
    ON inventory 
    TO joe;
    C.
    GRANT INDEX AND REFERENCES
    ON inventory 
    TO joe;
    D.
    GRANT ALL WITH GRANT OPTION

Homework Answers

Answer #1

1.  Statements that will successfully invoke the update_emp  procedure from a package:-

- update_emp('William');

- update_emp('Amy',1200);

- update_emp(v_increment=>2500);

2. Type of construct should you create to return a value without the need for any output arguments:-

- function

Unlike, Procedures in SQL functions must always return a value and has only input parameters.

3. Granted user Joe the INDEX and REFERENCES privileges on the INVENTORY table:-

- GRANT INDEX AND REFERENCES

ON inventory 
TO joe;
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions