notfoundattribute.sql

来自「Oracle 9i中文版基础培训教程」· SQL 代码 · 共 18 行

SQL
18
字号
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%notfound then
         dbms_output.put_line(to_char(cursorrecord.deptno));
      else
         dbms_output.put_line('发现数据!');
      end if;  
end;  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?