Aug 09, 2020 6:09 am
Create a PL/SQL Trigger to display the message "Re-Order Level reached for the item-item name", whenever an item quantity reaches 10 and below while updating for inserting an item.
Please check the attachment for additional information.
4 Replies
Aug 09, 2020 6:25 am
You can try this and let me know.
Create or replace trigger threshold
On Stock
Before insert or update
For each row
Is
V_qty number;
V_desc varchar2(30);
Begin
Select quantity, description into v_qty, v_desc
From stock
Where itemid = :new.itemid;
If v_qty < 10 then
Dbms_output.put_line(' Re-order level reached to the item: '||v_desc);
End;