I got this trigger, I want to evaluate the mobile phone and insert into another table if the regexp returns a value. I've tried with this but not success.
delimiter //
create trigger companyA_phones after insert on customer
for each row
begin
set @phone = (select new.phone from customer where new.phone regexp '^0416');
if (@phone) then
insert into company_A(new.id, @phone);
end if;
end//