mysql 存储过程基本写法

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;

根据自己需要,要不要参数

原文地址:https://www.cnblogs.com/xgyweb/p/6293123.html