猿问

大神们请帮我看看啊

set serveroutput on

declare

cursor guangbiao01 is select to_char(hiredate,'yyyy') FROM emp;

hiredata  VARCHAR2(4);

a80 number:=0;

a81 number:=0;

a82 number:=0;

a87 number:=0;

begin

open guangbiao01;

LOOP

fetch guangbiao01 INTO hiredata;

EXIT when guangbiao01%notfound;

if hiredata ='1980' then a81:=a81+1;

ELSIF hriedata ='1981' then a81:=a81+1;

elsif hiredata ='1982' then a82:=a82+1;*******************显示这一行有问题怎么也找不到啊

else hriedata ='1987' then a87:=a87+1;

end if;

end loop;

close guangbiao01;

dbms_output.put_line('tol'||(a80+a81+a82+a87));

dbms_output.put_line(a80);

dbms_output.put_line(a81);

dbms_output.put_line(a82);

dbms_output.put_line(a87);

end;

/


慕前端0336099
浏览 1095回答 1
1回答

ziom

大神没有,这里有一个伪神听到了你的召唤,赶来一看发现解决不了。。。
随时随地看视频慕课网APP

相关分类

Oracle
我要回答