Initializing, Populating, and Referencing Collections
Before a collection can be used, it must be initialized (instantiated). Instantiating
a collection is automatic for index-by tables, but for nested tables
and VARRAYs, you must use a special built-in function called a constructor.
Nested tables and VARRAYs, if you recall, start out atomically NULL—that is,
the whole collection is NULL, not just the elements. As in a record, values
can be assigned to a collection en masse or piecemeal. Assigning values to
elements in a collection requires use of subscript notation for the element.
To assign one whole collection to another en masse, you simply use the
assignment operator. Let’s look at examples of initializing and populating
collections.
Before a collection can be used, it must be initialized (instantiated). Instantiating
a collection is automatic for index-by tables, but for nested tables
and VARRAYs, you must use a special built-in function called a constructor.
Nested tables and VARRAYs, if you recall, start out atomically NULL—that is,
the whole collection is NULL, not just the elements. As in a record, values
can be assigned to a collection en masse or piecemeal. Assigning values to
elements in a collection requires use of subscript notation for the element.
To assign one whole collection to another en masse, you simply use the
assignment operator. Let’s look at examples of initializing and populating
collections.
解决方案 »
- 关于oracle语句优化问题,100万记录的update和insert语句优化,请指教!
- 菜鸟级别学Oracel
- 神奇的问题。SQL 错误: ORA-00911: 无效字符 00911. 00000 - "invalid character"
- oracle客户端安装
- ORACLE中文字符变成了一大堆#号?急
- 在哪里修改ORACLE的管理员密码
- Oracle 8i安装完成后,在DOS窗口输入svrmgrl命令,却得到ORA-12560: TNS :协议适配器错误
- oracle新手很迷惑的问题
- 菜鸟Oracle 求救,行转列
- Oracle如何根据条件关联查询另一个表计数数据
- 如何删除一个index?
- 请教大家一个难题!急!!!!!!!!!
v_test in varchar2
)
AS
type ar is varray(2) of varchar2(2);v_sign_num ar:=ar(1,2);
i number(2);
BEGIN
i:=1;
v_sign_num(1) :='s';
v_sign_num(2) :='s';
dbms_output.put_line(v_sign_num(1)); END;