2014-10-09 68 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