mysql 赋值问题,为什么他老说Not allowed to return a result set from a function
DROPFUNCTIONIFEXISTS`getClass`;CREATEFUNCTION`getClass`(ClassIDstrchar)RETURNSvarchar...
DROP FUNCTION IF EXISTS `getClass`;
CREATE FUNCTION `getClass`(ClassIDstr char)
RETURNS varchar(4000)
BEGIN
DECLARE ttt VARCHAR(4000);
DECLARE pamt_end VARCHAR(4000);
select @ttt:= userid from `user` where username='tenant';
set pamt_end=ttt;
RETURN pamt_end;
END; 展开
CREATE FUNCTION `getClass`(ClassIDstr char)
RETURNS varchar(4000)
BEGIN
DECLARE ttt VARCHAR(4000);
DECLARE pamt_end VARCHAR(4000);
select @ttt:= userid from `user` where username='tenant';
set pamt_end=ttt;
RETURN pamt_end;
END; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询