gpt4 book ai didi

mysql - 第 6 行的 SQL 语法错误

转载 作者:行者123 更新时间:2023-11-29 07:55:05 25 4
gpt4 key购买 nike

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

最佳答案

proper syntax是:

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

关于mysql - 第 6 行的 SQL 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25365179/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com