现有:
"表": department,及表中的字段 ID(主键),Deparment,Basicwage
序列:SEQ
创建触发器-DE_TRI'时发生错误。
错误类型:ORA-04098: 触发器 'DE_TRI' 无效且未通过重新确认的错
创建触发器的代码:
create or replace trigger DE_TRI
before insert
on department
for each row
begin
select SEQ.nextval into:new.id from dual;
以上为PL-SQL编辑器里执行时报的错,但是我在toad里执行时报的是如下错误:
2/41 PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
begincasedeclareend
exceptionexitforgotoifloopmodnullpragmaraisereturnselect
updatewhilewith<an identifier>
<a double-quoted delimited-identifier><a bind variable><<
closecurrentdeletefetchlockinsertopenrollbacksavepointsetsql
executecommitforallmerge<a single-quoted SQL string>pipe
求各位大侠解答!
------解决方案--------------------
pl/sql dev里也是没有编译通过
:new.id前加空格,如果还有错误,把完整的触发器代码贴上来