Trigger to subtract from attribute in another table
611420Dec 1 2007 — edited Dec 1 2007HI all, hope someone can help have been having trouble creating a trigger to subtract a value of a new tuple from a current value in another table.
Stock(name, stockqty)
Shipment(item, itemqty)
I want to have a trigger when insert a new tuple into shipment it takes the value of 'itemqty and subtracts it from stock.stockqty.
anyone have any ideas?
Thanks