phpMyAdmin
 sql >> Database >  >> Database Tools >> phpMyAdmin

creare trigger - errore in DECLARE

hai specificato i delimitatori?

delimiter #

create trigger bi_emps_fer before insert on emps for each row
begin

    declare newsal decimal(10,2) default 0;

    // do sql stuff here but not what you're doing !

    set new.salary = newsal;

end#

delimiter ;