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;
-> $$
最佳答案
if (condition) then
...
else
...
end if;
^^^----you're missing this bit
关于mysql - 第 6 行的 SQL 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25365179/