create procedure `eval`( in param text )
begin
set @sql = param;
prepare stmt from @sql;
execute stmt;
deallocate prepare stmt;
end
Panggil prosedur call tests.eval('set @ABC = 120')
dan di sesi saat ini, Anda dapat mengakses variabel @ABC
call tests.eval('set @ABC = 120');
select @ABC;