当前位置: 代码迷 >> Oracle开发 >> orcle 分号 没有正确结束命令执行,该怎么处理
  详细解决方案

orcle 分号 没有正确结束命令执行,该怎么处理

热度:314   发布时间:2016-04-24 06:49:16.0
orcle 分号 没有正确结束命令执行
create or replace trigger tri_test_id
  before insert on staffs 
  for each row
declare
  nextid number;
begin
  IF :new.id IS NULLor :new.id=0 THEN 
    select testseq.nextval 
    into nextid
    from sys.dual;
    :new.id:=nextid;
  end if;
end tri_test_id;

回车后不执行只是换行,多加几个分号进去也没用,到底是哪的问题呢,求解啊
------解决方案--------------------
你在哪里执行?
------解决方案--------------------
触发器 你还想怎么执行?你写一条insert into staffs 的语句不就执行该触发器了