create trigger ask before update on invoice
-> for each row
-> begin
-> if(3<(select count(invoice_num) from invoice where customer_name=new.customer_name)) then
-> set new.bill_amount=new.bill_amount-((5/100)*bill_amount);
-> end;
-> $$
答案 0 :(得分:2)
if (condition) then
...
else
...
end if;
^^^----you're missing this bit