Why does it generate an error?

View Exhibit1 and examine the structure of the product table.

View Exhiblt2 and examine the procedure you created. The procedure uses the prod id to
determine whether the list price is within a given range.

You then create the following trigger on the product table.
CREATE OR REPLACE TRIGGER check_price__trg
BEF0RE INSERT OR UPDATE OF prod_id, prod_list_price
ON product FOR EACH ROW
WHEN (nev.prod_id <> NVX(old.prod_id,0) OR
New.prod__list_price <> NVL(old.prod_list_price, 0) )
BEGIN
check_price (:new.prod_id) ;
END
/
Examine the following update command for an existing row in the product table.
SQL> UPDATE produce SET prod_list_price = 10 WHERE prod_id=115;
Why does it generate an error?

View Exhibit1 and examine the structure of the product table.

View Exhiblt2 and examine the procedure you created. The procedure uses the prod id to
determine whether the list price is within a given range.

You then create the following trigger on the product table.
CREATE OR REPLACE TRIGGER check_price__trg
BEF0RE INSERT OR UPDATE OF prod_id, prod_list_price
ON product FOR EACH ROW
WHEN (nev.prod_id <> NVX(old.prod_id,0) OR
New.prod__list_price <> NVL(old.prod_list_price, 0) )
BEGIN
check_price (:new.prod_id) ;
END
/
Examine the following update command for an existing row in the product table.
SQL> UPDATE produce SET prod_list_price = 10 WHERE prod_id=115;
Why does it generate an error?

A.
because the procedure call in the trigger is not valid “

B.
because the condition specified in the when clause is not valid

C.
because both the procedure and trigger access the same table

D.
because the WHEN clause cannot be used with a row-level trigger

E.
because the column list specified with UPDATE in the trigger is not valid

Explanation:



Leave a Reply 5

Your email address will not be published. Required fields are marked *


samkelo siyabonga ngubo

samkelo siyabonga ngubo

C

Piero

Piero

C
(MUTATING TABLE)