创建事件时,为什么我Undeclared variable: voteType
在选择 sql 中添加第二列时会得到?不能在sql语句中指定第二列吗?这样做的正确方法是什么?
BEGIN
DECLARE c VARCHAR(2);
DECLARE vElm INT(10);
DECLARE vType TINYINT(1);
select distinct(country) into c from votes;
select votedElm into vElm, voteType into vType from votes where country = c;
END