也就是应该是这里的问题:
     :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

解决方案 »

  1.   

    也就是应该是这里的问题:
    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比较?
      

  2.   

    create table borrowlog
    (
      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));
      

  3.   

    end if 后面应该有个分号吧