2007-02-26
PL/SQL的游标使用小例
关键字: cursorsql 代码
- set serveroutput on
- declare
- tempsal scott.emp.sal%type;
- cursor mycursor is
- select * from scott.emp
- where sal>tempsal;
- cursorrecord mycursor%rowtype;
- begin
- tempsal:=800;
- open mycursor;
- fetch mycursor into cursorrecord;
- if mycursor%found then
- dbms_output.put_line(to_char(mycursor%rowcount));
- else
- dbms_output.put_line('没有找到数据');
- end if ;
- end;







评论排行榜