How to write this trigger
😔😔😔😔😔😔😔😔😔
Hi ,
I am not much touch in database programming but have to include trigger for this following table in one of my subprograms so please can anyone suggest a solution for it
as I am days stuck on these for days and not able to get it .
customer(custno,custname,address)
order(orderno,total_cost,date_ordered,date_dispatched,date_paid,status)
orderline(orderno,prodno,quantity)
product(prodno,prodname,proddescr,unit_cost)
We have to write a rule/trigger to update total cost of an order when we change quantity in orderline table .
also we have another trigger to handle situation when product is removed from stock
it should follow two action as
1) update status field for any orders for that product to be seeking alternative products
2) Set the quantity values of orderline containing the product to null .
I would be thanful for the reply .