I want to create a trigger on a table before update:
create or replace trigger backup_t
before update on e_naqi
for each row
begin
insert into e_naqi_bkp values(:old.employee_id,:old.first_name,:old.department_id,:old.manager_id,sysdate);
end;
but when I tried to execute it, error occurs which states as
2/108 PL/SQL: ORA-00933: SQL command not properly ended
2/1 PL/SQL: SQL Statement ignored
3/5 PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
( begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge
I tried to compile the trigger and it should be created successfully but error occurred.