mysql - SQL syntax error at line 6 -


create trigger ask before update on invoice     -> each row     -> begin     -> if(3<(select count(invoice_num) invoice customer_name=new.customer_name))     -> set new.bill_amount=new.bill_amount-((5/100)*bill_amount);     -> end;     -> $$ 

the proper syntax is:

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

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -