Question: Using the DBMS_OUTPUT package, create and run a PL/SQL block that displays lines for each product in the BB_PRODUCT table. If the stock level for
Using the DBMS_OUTPUT package, create and run a PL/SQL block that displays lines for each product in the BB_PRODUCT table. If the stock level for a product is above the reorder point, only a single line should be displayed that looks like the following code:
Product 5 - Sumatra does NOT need ordering
If the stock level is below the reorder point, lines such as the following should be displayed:
Product 5 Sumatra needs ordering!
Stock = 24, reorder point = 25
Before running the block, issue the following statements to make sure product 4's stock level is below the reorder point:
UPDATE bb_product
SET stock = 24
WHERE idProduct = 4;
COMMIT;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
