编程论坛's Archiver

nolan 发表于 2005-11-6 18:31

初学游标的困惑

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

nolan 发表于 2005-11-7 19:31

<P>怎么没有人回答我呀!!!</P>

anycall628 发表于 2005-11-12 21:35

set serveroutput on<BR>打这个命令先,再运行一下看看有没有显示

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.