oracle11g游标及触发器相关知识
statement1;
statement2;
…
end loop;
14.declare
cursor emp_cursor(v_deptno NUMBER) is
select ename,sal from emp where deptno=v_deptno;
begin
for emp_record in emp_cursor(20) loop
dbms_output.put_line(emp_record.ename||’
是’||emp_record.sal);
end loop;
end;
15.cursor cursor_name is select_statement
for update [of column_reference][nowait]
在游标结果集上加锁,NOWAIT子句指定不等待锁,也就是如
果要加锁的数据已经被锁定,则不等待直接返回。
将显示游标行中的当前行修改或者删除,更新或删除的语法
如下:
update table_name set column=..
where current of cursor_name;
delete from table_name where current of cursor_name;
的薪水