Current location - Training Enrollment Network - Books and materials - Book management system oracle
Book management system oracle
According to your situation, when a new record is created in the borrowing table, it should be triggered.

Create a trigger xxxxxxxx after inserting each line on the loan form.

begin

Update account book table set account book quantity = account book quantity-1 where account book id=:new. Borrowing books list book id

end

Like this, the rest will be debugged by yourself.