Get Dataset from Stored Procedure in Oracle
来源:互联网 发布:淘宝联盟订单明细api 编辑:程序博客网 时间:2024/04/29 23:59
Stored Procedure (SP) can return data through one variable. We need to get dataset some times. Only one way to get the target is return cursor which can store dataset in SP.
A cursor is a mechanism by which you can assign a name to a “Select statement” and manipulate the information with that SQL statement.
l
CREATE OR REPLACEPROCEDURE SP_NAME(
AS
v_created VARCHAR2(100);
BEGIN
OPEN TEST1 FOR SELECT created
LOOP
FETCH TEST1 INTO v_created;
EXIT WHEN TEST1%NOTFOUND;
dbms_output.put_line(v_created);
END LOOP;
CLOSE TEST1;
END SP_TEMPLATE;
/
l
DECLARE
BEGIN
END;
l
SQL1:
OPENTEST1 FOR SELECT created
SQL2:
OPENTEST1 FOR initialStr;
Note: If you want to call the SP with cursor with JAVA, remove the code after LOOP clause.
- Get Dataset from Stored Procedure in Oracle
- oracle, stored procedure, cursor
- Oracle Stored Procedure example
- Oracle procedure return DataSet used in JDBC
- Run DTS from stored procedure
- Creating a Stored Procedure or Function in an Oracle Database
- Debug stored procedure in VS2005
- Use Stored Procedure in JPA
- Calling a Stored Procedure in a Database
- Calling a Stored Procedure in a Database
- ORDER, SUM and Stored Procedure in MySQL
- How to call stored procedure in Hibernate
- How to call stored procedure in Hibernate
- How To Use a DataReader Against an Oracle Stored Procedure in Visual C# .NET
- SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
- SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
- pass blob to oracle stored procedure
- Oracle Java Stored Procedure调用Unix shell
- proj4库编译及相关问题解决
- 推荐视觉跟踪领域的几个研究者
- HDU 4998 Rotate(鞍山网络赛B题)
- Beaglebone Black——嵌入式linux系统内核编译
- RabbitMQ学习(七)Ubuntu环境安装与.NET客户端测试
- Get Dataset from Stored Procedure in Oracle
- 关注的计算机视觉研究组和个人主页列表
- Combining multiple commits into one commit using git rebase
- CVPR 2013 录用论文(目标跟踪部分)
- 正则表达式速查
- 对QPushbutton背景设置palette无法生效的问题
- 网编那些事儿
- 单链表实现线性表的基本算法(一)
- 计算机视觉研究群体及专家主页汇总