OraclePLSQL教程.ppt

declare type mary_emp_cursor is ref cursor; test_cursor mary_emp_cursor; v_ename emp.ename%type; v_sal emp.sal%type; begin open test_cursor for select ename,sal from emp where deptno=no; loop fetch test_cursor into v_ename,v_sal; exit when test_cursor%notfound; if v_sal5000 then update emp set sal=sal+100 where ename=v_ename; end if; dbms_output.put_line(姓名:||v_ename||工资:||v_sal); end loop; close test_cursor; end; * * * * * * * creat table book(bookid number(10),bookname varchar2(50),unit number(4,2)); ------存储过程 create or replace procedure mary_pro03(m

文档评论(0)

1亿VIP精品文档

相关文档