集合属性的含义是什么

Pra*_*sam -2 plsql

我想在我的代码中找到集合属性.我只知道集合对象及其访问方法.任何人都可以向我解释"收集属性"是什么意思吗?

Bob*_*ica 5

Collection "methods" are sometimes referred to as "attributes". Thus, the "attributes" of a collection are the methods which can be invoked on the collection:

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.
Run Code Online (Sandbox Code Playgroud)

So the "accessing methods" you mention in your question are the "attributes" you're looking for.

Documentation here

Unfortunately, Oracle overloads the term "attribute" but isn't really consistent in its use. For example, %NOTFOUND and %ROWTYPE are cursor attributes.

Share and enjoy.