CREATE PROCEDURE mytestinf(ids int, out sc INT)
BEGIN
SELECT @scs:=count(1) from t3 where uid=ids;
set sc=@scs;
END;
CALL mytestinf(1,@b);
SELECT @b;
根据自己需要,要不要参数
CREATE PROCEDURE mytestinf(ids int, out sc INT)
BEGIN
SELECT @scs:=count(1) from t3 where uid=ids;
set sc=@scs;
END;
CALL mytestinf(1,@b);
SELECT @b;
根据自己需要,要不要参数