sql - ORA-00927: missing equal sign -
im creating first sql trigger,
create or replace trigger totalsalary after insert on employee each row when ( new.dno not null ) begin update department set totalsalary totalsalary + new.salary dno = new.dno; end ;
but got error message , dont know how fix it
error @ line 3: pl/sql: ora-00927: missing equal sign 1. create or replace trigger sueldototal 2. after insert on empleado 3. each row 4. when ( new.dno not null ) 5. begin
set totalsalary totalsalary + new.salary
you have missing equal sign in set clause.
create or replace trigger totalsalary after insert on employee each row when ( new.dno not null ) begin update department set totalsalary = totalsalary + :new.salary dno = :new.dno; end; /
new.salary
also, incorrect while referencing old , new values:
:new.salary
Comments
Post a Comment