读书人

oracle 循环事例

发布时间: 2012-08-08 14:32:45 作者: rapoo

oracle 循环例子

declare  temp_emp test_tw%rowtype;   cursor cur2 is select * from test_tw;   begin  if cur2%isopen = false then  open cur2;   end if;   for i in 0..5 loop   fetch cur2 into temp_emp;   exit when cur2%notfound;   dbms_output.put_line('编号:'||temp_emp.id||','||'名字:'||temp_emp.xm);end loop;   close cur2;   end;  

?

读书人网 >其他数据库

热点推荐