【发布时间】:2011-03-17 06:40:45
【问题描述】:
我得到了这个触发器,如果正则表达式返回一个值,我想评估手机并插入另一个表。我已经尝试过,但没有成功。
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//
【问题讨论】: