oracle中触发器的创建问题
创建触发器代码如下:CreateorreplacetriggertrigAfterinsertordeleteorupdateonemp2foreachrowBeginI...
创建触发器代码如下:
Create or replace trigger trig
After insert or delete or update on emp2 for each row
Begin
If inserting then
Insert into emp2_log values(USER,’insert’,sysdate);
Elsif updating then
Insert into emp2_log values(USER,’insert’,sysdate);
Elsif deleting then
Insert into emp2_log values(USER,’insert’,sysdate);
end if;
End;
最后提示错误Warning: Trigger created with compilation errors,请问高手是哪个地方出了问题? 展开
Create or replace trigger trig
After insert or delete or update on emp2 for each row
Begin
If inserting then
Insert into emp2_log values(USER,’insert’,sysdate);
Elsif updating then
Insert into emp2_log values(USER,’insert’,sysdate);
Elsif deleting then
Insert into emp2_log values(USER,’insert’,sysdate);
end if;
End;
最后提示错误Warning: Trigger created with compilation errors,请问高手是哪个地方出了问题? 展开
1个回答
展开全部
Create Or Replace Trigger Trig
After Insert Or Delete Or Update On emp2 For Each Row
Begin
If Inserting Then
Insert Into Emp2_Log Values (User,'insert', Sysdate);
Elsif Updating Then
Insert Into Emp2_Log Values (User,'insert', Sysdate);
Elsif Deleting Then
Insert Into Emp2_Log Values (User, 'insert', Sysdate);
End If;
End;
你的单引号是全角的吧
After Insert Or Delete Or Update On emp2 For Each Row
Begin
If Inserting Then
Insert Into Emp2_Log Values (User,'insert', Sysdate);
Elsif Updating Then
Insert Into Emp2_Log Values (User,'insert', Sysdate);
Elsif Deleting Then
Insert Into Emp2_Log Values (User, 'insert', Sysdate);
End If;
End;
你的单引号是全角的吧
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询