[英]mysql trigger operand should contain 2 columns
My trigger looks like this: 我的触发器如下所示:
begin
IF ((NEW.tgebucht >= NEW.tteilnmax) AND (NEW.tgebucht!=0) AND (OLD.tstatus=0)) THEN
SET NEW.tstatus = 1;
ELSEIF ((NEW.tgebucht < NEW.tteilnmax) AND (OLD.tstatus=1)) THEN
SET NEW.tstatus =0;
END IF;
IF ((0,25*NEW.tteilnmax)>=(NEW.tteilnmax-NEW.tgebucht)) THEN
SET NEW.trestplatze =1;
END IF;
end
And I am getting an error like this: 我收到这样的错误:
Operand should contain 2 column(s)
I am not really sure why, I know it is related to second if but I can't configure where, does anyone has an idea what to change? 我不太确定为什么,我知道这与秒相关,但是我无法配置在哪里,有人知道改变什么吗? Am I doing something wrong here?
我在这里做错什么了吗? Any help would be appreciated.
任何帮助,将不胜感激。
The syntax looks well. 语法看起来不错。 But there is a hidden bug in next line -
但是在下一行中有一个隐藏的错误-
IF ((0,25*NEW.tteilnmax)>=(NEW.tteilnmax-NEW.tgebucht)) THEN
You should use '.' 您应该使用“。” as a point delimiter -
作为点定界符-
IF ((0.25*NEW.tteilnmax)>=(NEW.tteilnmax-NEW.tgebucht)) THEN
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.