Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Does this look right? if not, what changes are needed to be made? Q: Modify the trigger in Assignment 9-2 as needed. Add code to
Does this look right? if not, what changes are needed to be made?
Q: Modify the trigger in Assignment 9-2 as needed. Add code to check whether the DTRECD column already has a date in it and is now being set to NULL.
A: CREATE OR REPLACE TRIGGER bb_reqfill_trg
AFTER UPDATE OF dtrecd ON bb_product_request
FOR EACH ROW
BEGIN IF :OLD.dtrecd IS NULL THEN
UPDATE bb_product
SET
stock = stock + :NEW.qty
WHERE idProduct = :NEW.idProduct;
END IF;
END;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started