2014-10-09 71 views
-2

我想在我的代碼中找到集合屬性。 我只知道集合對象及其訪問方法。 任何人都可以向我解釋什麼「集合屬性」的含義?集合屬性的含義

+0

不要低估自我教學的力量。看到我的答案。 – nop77svk 2014-10-09 09:30:18

回答

0

解決這些問題的最佳地點是官方的Oracle文檔。在你的情況下,它是關於PL/SQL Collections and Records的一個,收集方法請參閱the respective chapter

+0

您擁有文檔中的所有示例。 – nop77svk 2014-10-09 09:40:53

+0

我已經讀過,仍然有困惑 – Pratsam 2014-10-09 09:45:26

+0

類型customer是int index的表格,由pls_integer – Pratsam 2014-10-09 09:46:30

5

收集「方法」有時被稱爲「屬性」。因此,一個集合的「屬性」是可以在收集調用的方法:

Method Type  Description 
DELETE Procedure Deletes elements from collection. 
TRIM Procedure Deletes elements from end of varray or nested table. 
EXTEND Procedure Adds elements to end of varray or nested table. 
EXISTS Function Returns TRUE if and only if specified element of varray or nested table exists. 
FIRST Function Returns first index in collection. 
LAST Function Returns last index in collection. 
COUNT Function Returns number of elements in collection. 
LIMIT Function Returns maximum number of elements that collection can have. 
PRIOR Function Returns index that precedes specified index. 
NEXT Function Returns index that succeeds specified index. 

所以,你在你的問題提「訪問方法」是「屬性」,你要尋找的。

Documentation here

不幸的是,甲骨文重載術語「屬性」,但不是在它的使用真的是一致的。例如,%NOTFOUND%ROWTYPE是遊標屬性。

分享和享受。

+0

我從來沒有聽說過收集方法被稱爲「屬性」。那麼,一個人瞭解他的一生。 :-)謝謝,鮑勃。 – nop77svk 2014-10-10 07:46:08