一、调用存储过程

一、返回单个值

1、存储过程准备

这里先创建一个存储过程,传入参数为age,传出参数为count。然后先测试一下是否正确。

CREATE DEFINER=`root`@`localhost` PROCEDURE `pro_get_usercountbyage`(in age int,out user_count int)
BEGIN
 select count(1) into user_count from user a where a.age=age;
END
View Code

相关文章:

  • 2021-06-14
  • 2022-02-09
  • 2021-09-26
  • 2021-09-17
  • 2022-12-23
  • 2021-11-18
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2021-12-25
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案