mysql的函数内为何定义变量报错?
CREATEDEFINER=CURRENT_USERFUNCTION`NewProc`(`p_presell_no_1`varchar)RETURNSvarchar(20...
CREATE DEFINER = CURRENT_USER FUNCTION `NewProc`(`p_presell_no_1` varchar)
RETURNS varchar(20)
BEGIN
DECLARE @ls_ret VARCHAR(20);
SET ls_ret='Error';
select nvl(presell_contract.presell_status, '0')
into @ls_ret
from presell_contract
where presell_contract.presell_no = p_presell_no_1;
RETURN @ls_ret;
END; 展开
RETURNS varchar(20)
BEGIN
DECLARE @ls_ret VARCHAR(20);
SET ls_ret='Error';
select nvl(presell_contract.presell_status, '0')
into @ls_ret
from presell_contract
where presell_contract.presell_no = p_presell_no_1;
RETURN @ls_ret;
END; 展开
2013-09-04
展开全部
declare is_ret varchar(20);
--不能用@符
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询