1. 首页
  2. 数据库
  3. 其它
  4. MySQL 存储过程和Cursor的使用方法

MySQL 存储过程和Cursor的使用方法

上传者: 2021-02-01 15:23:02上传 PDF文件 30.7KB 热度 22次
示例如下: 代码如下:CREATE PROCEDURE `justifyGroupNum`() NOT DETERMINISTIC SQL SECURITY DEFINER COMMENT ” BEGIN /*how to run:call justifyGroupNum()*/ DECLARE p_group_id int; declare p_num int; declare stopFlag int; DECLARE cursor_name CURSOR FOR select c_group_id,count(*) as num from `t_group_member` where
用户评论