简体   繁体   English

第6行的SQL语法错误

[英]SQL syntax error at line 6

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;
    -> $$

The proper syntax is: 正确的语法是:

if (condition) then
   ...
else
   ...
end if;
   ^^^----you're missing this bit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM