①创建一个包,在该包中定义类型test_cursor是个游标 Create or replace package tespackage as Type test_cursor is ref cursor; End tespackage; ① 创建过程: Create or replace procedure sp_pro10 (spno in number,p_cursor out tespackage.test_cursor) is Begin Open p_cursor for select * from emp where deptno=spno; End sp_pro10; 如何在sqlplus中调用此过程exec sp_pro10(?,?)第二个参数如何写呢?我想获取emp表中的部门号为10的所有记录。我有更好的答案 | 搜索相关资料
按默认排序 | 按时间排序
2条回答
①创建一个包,在该包中定义类型test_cursor是个游标 Create or replace package tespackage as Type test_cursor is ref cursor; End tespackage; ① 创建过程: Create or replace procedure sp_pro10 (spno in number,p_cursor out tespackage.test_cursor) is Begin Open p_cursor for select * from emp where deptno=spno; End sp_pro10; 如何在sqlplus中调用此过程exec sp_pro10(?,?)第二个参数如何写呢?我想获取emp表中的部门号为10的所有记录。我有更好的答案 | 搜索相关资料
本文详细介绍了Oracle数据库中游标的创建及使用方法,包括通过存储过程传递游标参数的具体实现方式,并提供了完整的示例代码。
5374

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



