以下是mySql数据库存储过程打印参数的写法,希望大家了解和指正:
相对Oracle数据库的 dbms_output.put_line();
在mysql里面的写法是 select 参数名; 形式.
举个栗子:
drop procedure if exists 'pro_printParam';
create procedure()
begin
declare @test_num int;
select count(1) into test_num from table_name;
select @test_num;
end;
本文介绍MySQL中如何通过存储过程来打印变量值。通过创建一个简单的存储过程并使用SELECT语句来显示变量内容,以此替代Oracle中的dbms_output.put_line()方法。
826

被折叠的 条评论
为什么被折叠?



