drop trigger if exists sorder_after_insert; DELIMITER // create trigger sorder_after_insert after insert on dbr_sorder for each row begin insert into pro_sorder_shop (id) value (new.id) ; if new.reward_amt <> '0.0000' then call reward_bd_act('sorder', new.id, 0); end if; end // DELIMITER ;