在哪里可以找到存储过程输出?

时间:2021-04-28 02:10:19

标签: mysql

我有一个存储过程,它将通过 select 子句显示一些消息。 此过程将在事件调度中执行,我想了解消息将存储在哪里?

drop procedure if exists sp_tt;
delimiter $$
create procedure sp_tt()
begin
    select 'message'; -- where could I find this message ?
end;
$$

drop event if exists ent_tt;
create event ent_tt on schedule every 5 second
do
begin
 call sp_tt();
end 
$$
delimiter ;

2 个答案:

答案 0 :(得分:0)

在程序内部,您可以将值插入表中,然后您可以检查该表中的值

答案 1 :(得分:0)

要么使用 OUT 参数返回值,要么将过程更改为函数并使用 RETURN 返回值。