注册 登录
编程论坛 Oracle论坛

初学游标的困惑

nolan 发布于 2005-11-06 18:31, 955 次点击
以下是我编写的游标:
declare
v_xm system.xsxxb.xm%type;
v_bj system.xsxxb.bj%type;
v_xh system.xsxxb.xh%type;
cursor mycursor(v_xh_1 system.xsxxb.xh%type) is
select xm,bj from system.xsxxb where xh=v_xh;
begin
v_xh='20020156';
open mycursor(v_xh);
fetch mycursor into v_xm,v_bj;
close mycursor;
dbms_output.put_line(v_xm||'的班级是'||v_bj);
end;
请问一下,为什么最后结果不能输出dbms_output.put_line(v_xm||'的班级是'||v_bj);这段。
而只显示PL/SQL过程已完成;为什么?请帮我解决一下;

2 回复
#2
nolan2005-11-07 19:31

怎么没有人回答我呀!!!

#3
anycall6282005-11-12 21:35
set serveroutput on
打这个命令先,再运行一下看看有没有显示
1