MySQL触发问题
我得到了这个触发器,如果regexp返回一个值,我想评估手机并插入另一个表。我试过这个但没有成功。
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//
没有找到相关结果
已邀请:
1 个回复
队辅坟阮阶
对此触发器的需求确实表明您的底层架构设计未正确规范化,因此您可能也想要考虑这一点。