Home > database >  Why there will be a Warning: the Trigger created with compilation errors
Why there will be a Warning: the Trigger created with compilation errors

Time:09-20

The create or replace the trigger trg_dept
Before the insert or update or delete on dept
Declare
V_now varchar2 (30);
The begin
V_now:=to_char (sysdate, 'yyyy - mm - dd hh24: mi: ss');
Case
When inserting then
Dbms_output. Putline (v_now | | 'to insert operations dept table,');
The when updating then
Dbms_output. Putline (v_now | | 'to update operation, the dept table).
The when deleting then
Dbms_output. Putline (v_now | | 'to delete operation dept table,');
End a case;
end;

CodePudding user response:

The create or replace the trigger trg_dept
Before the insert or update or delete on dept
Declare
V_now varchar2 (30);
The begin
V_now:=to_char (sysdate, 'yyyy - mm - dd hh24: mi: ss');
If inserting then
Dbms_output. Putline (v_now | | 'to insert operations dept table,');
Elsif updating then
Dbms_output. Putline (v_now | | 'to update operation, the dept table).
Elsif deleting then
Dbms_output. Putline (v_now | | 'to delete operation dept table,');
End the if;
end;

CodePudding user response:

I have found the problem, in fact I didn't watch carefully, is put_line without intermediate underline!
  • Related