学过MySQL之后却没有总结,今天好不容易有点时间来看看。
show proceduce status \G;
show create produce sp_test\G;
详细查看,可以看到具体过程中的代码内容
drop procedure sp_test;
call sp_test(1,@num);
将返回值存储在num变量中,在out型变量前加上@
直接可以使用select @num;
来查看具体的值
---恢复内容结束---
学过之后却没有总结,今天好不容易有点时间来看看。
delimiter // create proceduce sp_test( in id int,out num int ) begin select sum(id) into num; end // delimiter;
show proceduce status \G;
show create produce sp_test\G;
详细查看,可以看到具体过程中的代码内容
drop procedure sp_test;
call sp_test(1,@num);
将返回值存储在num变量中,在out型变量前加上@
直接可以使用select @num;
来查看具体的值