mysql的怎么返回受影响行数

今天写一个删除帖子的方法,具体内容是

1、先删除该贴子的回复-delete reply

2、再删除帖子-delete topic

然后就想着写一个存储过程(数据库是mysql):

drop procedure if exists delCourse;
create procedure delCourse(in var_cno int)
begin 
    delete from sc where cno=var_cno;
    delete from course where cno=var_cno;
    select row_count() into result;
    commit;
end;

但是不知道怎么在mapper以及controller中接受返回的收影响行数,所以求助数据库大神告诉mapper文件中的代码该如何实现

不知道你用的orm是什么,hbn还是mybatis,参考下面之一
https://blog.csdn.net/findmyself_for_world/article/details/38689479
https://blog.csdn.net/benben683280/article/details/79645697