Home > Database > Mysql Tutorial > Oracle 数据 使用游标

Oracle 数据 使用游标

WBOY
Release: 2016-06-07 18:06:09
Original
809 people have browsed it

Oracle数据中如何使用游标的方法

代码如下:
create or replace
PROCEDURE proceudre_name AS
BEGIN
DECLARE
sPara VARCHAR(50);
sPara2 VARCHAR(50);
CURSOR c_cursor IS SELECT ID,Name FROM Temp_table;
BEGIN
OPEN c_cursor;
LOOP
FETCH c_cursor INTO sPara, sPara2;
EXIT WHEN c_cursor%NOTFOUND;
BEGIN
--just do what you want.
END;
END LOOP;
CLOSE c_cursor;
END;
END;
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template