Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

3. How is money associated with subjective well-being?

Answered: 1 week ago

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago