也就是应该是这里的问题:
:new.fine := days;
update account set total_fine=total_fine+days where account_id=:new.account_id;
end if
如果直接去掉if days > 0 then
以及end if
:new.fine := days;
update account set total_fine=total_fine+days where account_id=:new.account_id;
end if
如果直接去掉if days > 0 then
以及end if
if days > 0 then
:new.fine := days;
update account set total_fine=total_fine+days where account_id=:new.account_id;
end if
如果直接去掉if days > 0 then
以及end if就可以了。莫非是days不能与0比较?
(
log_id number(16,0),
account_id varchar2(11),
book_id number(16,0),
borrow_date date,
deadline date,
return_date date,
times number(2,0),
fine number(3,0),
constraint pk_borrowlog primary key(log_id));