drop trigger if exists company_after_insert; DELIMITER // create trigger company_after_insert after insert on dbr_company for each row begin if new.mobile_no != '' then insert into dbr_item_thm ( id, created_on, updated_on, member_buyer_id, seq_no, sort, contact_name, mobile_no ) value ( NULL, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), new.id, 0, '0', new.company_name, new.mobile_no ) ; end if; end// DELIMITER ;