首页WIN10问题Oracle显示游标简析(转载)

Oracle显示游标简析(转载)

时间2022-12-11 04:45:47发布分享专员分类WIN10问题浏览119

  Oracle显示游标简析

  create or replace procedure 显示游标更新

  as

  --select taid, taname, bqid from table3

  new_taid number; 上海oracle培训landscaper-academy.com

  cursor cur_table is --显示声明游标

  select taid from table3 where taid < 10

  for update of taid; --taid在<10的范围之内进行锁定

  c_row cur_table%rowtype; --返回行的数据

  begin

  open cur_table;

  loop

  fetch cur_table into new_taid;

  exit when cur_table%notfound;--遍历之前进行判断notfound ,不为空进行更新

  update table3 set taid=1+new_taid--taid > 10 并且出现重复的值就不在累加

  where current of cur_table; --锁定的游标

  dbms_output.put_line('taid=:' ||new_taid);

Oracle显示游标简析(转载)

  end loop;

  close cur_table;

  commit;

  end 显示游标更新;

爱资源吧版权声明:以上文中内容来自网络,如有侵权请联系删除,谢谢。

Oracle游标简析Oracle简析notfound
Oracle 数据库中如何显示游标的%notfound的值 高中英语阅读理解态度词汇总,高中三年都有用!