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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -