调用MySql 分页存储过程带有输入输出参数

 Create PROCEDURE getuser
(
IN pageIndex INT,
IN pageSize INT,
OUT count INT
) BEGIN
declare pindex int DEFAULT (pageIndex-1)*pageSize; select * from lc_user order by id LImit pindex,pageSize; SELECT COUNT(id) INTO count from lc_user; END

调用:

CALL getuser(1,10,@count);

select @count;

结果集:

调用MySql  分页存储过程带有输入输出参数

调用MySql  分页存储过程带有输入输出参数

上一篇:Spark2.0自定义累加器


下一篇:mysql外键关联