我有一个存储过程,它将通过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 ;
在过程中,您可以将值插入表中,稍后您可以检查该表中的值
使用OUT
参数返回值,或者将过程更改为函数并使用RETURN
返回值。