declare
stu_id number;
stu_name varchar(20);
cursor stu_cur is
select sid,sname
from stt
where sclass='first';
Begin
Open stu_cur;
Loop
fetch stu_cur into stu_id,stu_name;
exit when stu_cur%notfound;
dbms_output.put_line('student_id: '|| stu_id || 'student_name:'|| stu_name);
end loop;
close stu_cur;
end;