自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle游標(biāo)常用屬性

數(shù)據(jù)庫 Oracle
Oracle數(shù)據(jù)庫中的游標(biāo)我們經(jīng)常用到,下文對(duì)Oracle游標(biāo)常用屬性作了詳細(xì)的敘述,希望對(duì)您學(xué)習(xí)游標(biāo)方面能有所幫助。

Oracle游標(biāo)相信大家都不陌生,下面就為您詳細(xì)介紹Oracle游標(biāo)的常用屬性,如果您對(duì)Oracle游標(biāo)方面感興趣的話,不妨一看。

Oracle游標(biāo)常用屬性:

%FOUND:變量***從游標(biāo)中獲取記錄的時(shí)候,在結(jié)果集中找到了記錄。

%NOTFOUND:變量***從游標(biāo)中獲取記錄的時(shí)候,在結(jié)果集中沒有找到記錄。

%ROWCOUNT:當(dāng)前時(shí)刻已經(jīng)從游標(biāo)中獲取的記錄數(shù)量。

%ISOPEN:是否打開。

  1. Declare  
  2.  
  3.  /* 定義靜態(tài)游標(biāo) */  
  4.  
  5.  Cursor emps is  
  6.  
  7.  Select * from employees where rownum<6 order by 1;  
  8.  
  9.  Emp employees%rowtype;  
  10.  
  11.  Row number :=1;  
  12.  
  13. Begin  
  14.  
  15.  Open emps; /* 打開靜態(tài)游標(biāo) */  
  16.  
  17.  Fetch emps into emp; /* 讀取游標(biāo)當(dāng)前行 */  
  18.  
  19.  Loop  
  20.  
  21.  If emps%found then  
  22.  
  23.    Dbms_output.put_line('Looping over record '||row|| ' of ' || emps%rowcount);  
  24.  
  25.    Fetch emps into emp;  
  26.  
  27.    Row :row + 1;  
  28.  
  29.  Elsif emps%notfound then  
  30.  
  31.    Exit;   
  32.  
  33.  End if;  
  34.  
  35.  End loop;  
  36.  
  37.  If emps%isopen then  
  38.  
  39.  Close emps;   /* 關(guān)閉游標(biāo) */  
  40.  
  41.  End if;  
  42.  
  43. End;  
  44.  
  45. /  
  46.  

 
 

 


 【編輯推薦】

Oracle創(chuàng)建表和索引

教您如何實(shí)現(xiàn)Oracle重建索引

全面解析Oracle文件系統(tǒng)

當(dāng)前Oracle系統(tǒng)時(shí)間的查詢方法

ORACLE系統(tǒng)表和數(shù)據(jù)字典視圖

 

 

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-11-16 15:40:21

oracle游標(biāo)

2010-11-16 15:11:52

Oracle隱式游標(biāo)

2010-04-21 15:02:50

Oracle使用游標(biāo)

2010-04-21 15:10:35

Oracle游標(biāo)

2010-11-16 14:59:39

Oracle顯式游標(biāo)

2010-05-07 12:07:08

Oracle 多層游標(biāo)

2010-04-21 14:53:46

Oracle游標(biāo)

2010-05-06 11:02:26

Oracle游標(biāo)

2010-11-16 14:53:02

Oracle游標(biāo)表達(dá)式

2010-08-24 13:55:38

DIVstyle

2015-03-03 15:59:25

Android開發(fā)屬性

2010-04-21 15:22:54

Oracle游標(biāo)

2010-04-09 09:07:43

Oracle游標(biāo)觸發(fā)器

2010-04-26 13:54:04

Oracle查看

2010-10-28 16:46:23

查詢Oracle數(shù)據(jù)庫

2011-04-14 13:29:42

Oracle日期轉(zhuǎn)換

2010-04-02 08:42:32

Oracle 游標(biāo)

2009-01-11 08:16:00

自適應(yīng)游標(biāo)共享新特性Oracle 11g

2015-03-03 09:19:12

UIScrollVie

2010-04-13 13:01:21

Oracle exp
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)