标签:
declare
cursor 游标名称
is
查询语句;
begin
--其他语句
end;
列子:
declare
cursor cur_stu
is
select name from student where id=2;
sname student.name%type;
result varchar2(20);
begin
open cur_stu;
loop
fetch cur_stu into sname;
exit when cur_stu%notfound;
result:=result||sname||‘‘;
end loop;
dbms_output.put_line(‘我的名字叫‘ || result);
close cur_stu;
end;
标签:
原文地址:http://www.cnblogs.com/wush-2015/p/4618126.html