我打算写触发器来监听借书表的变化,如果书籍借出数量大于5的话打印提示语,按这个思路来写但是报错了
错误(8,4): PLS-00103: 出现符号 ";"在需要下列之一时: if
create or replace trigger protect after insert on BOOK_BORROW
for each row declare begin
if inserting then
if BOOK_BORROW.BOOK_NUM >=5 then dbms_output.put_line('已超出5本借阅范围') end;
有人知道是什么原因的,我是打算用存储过程来执行表的插入的