Hi,
I would like to write an update trigger for a hiring database but unfortunately, I'm really new to SQL and I don't know how.
When a customer returns a hired item, the return date is recorded within the 'hire' table which has the following references (customer_id and stock_id).
The Stock table has 'Status' as one of the fields.
What I would like to do is write a trigger that updates the stock status of an item from 'On hire' to 'In Store'. I would like this trigger to fire when the 'return_date'is entered in the hire table. How can I do this?
Thanks and regards,
Francis
I would like to write an update trigger for a hiring database but unfortunately, I'm really new to SQL and I don't know how.
When a customer returns a hired item, the return date is recorded within the 'hire' table which has the following references (customer_id and stock_id).
The Stock table has 'Status' as one of the fields.
What I would like to do is write a trigger that updates the stock status of an item from 'On hire' to 'In Store'. I would like this trigger to fire when the 'return_date'is entered in the hire table. How can I do this?
Thanks and regards,
Francis