当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: form一次提交的极限是多少? ......
    摘要: sql_string.format("select top 5 * from tempsm where sendtime< #%s# order by sendtime",getcurrenttime()) ......


有关oracle cursor游标无记录时的操作问题

当游标没记录时,我查到的资料都是exit操作,如下:  
  fetch   cur_servhis   into   thisservhis;  
  exit   when   cur_servhis%notFound;  
  我现在需要当没记录时,要执行一个insert操作,请问怎么写?

NO.1   作者: qiaozhiwei

open   cur_servhis;  
  loop  
  fetch   cur_servhis   into   thisservhis;  
  exit   when   cur_servhis%notFound;  
  end   loop;  
  if   cur_servhis%rowcount   =   0   then  
    insert   into   ......  
  end   if;  
  close   cur_servhis;

NO.2   作者: dinya2003

.....  
          open   c;  
          loop  
          fetch   c   into   user_id,user_name;  
          if   c%rowcount=0   then      
                  insert   into   dinya_user   values(1,E);  
                  commit;  
          exit;  
          end   if;  
          end   loop;  
          close   c;  
  end   ;


    摘要: 请问: delphi 中如何设置﹐使每次打开delphi时﹐开启的总是我的project …. ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE