http://www.csdn.net/expert/topic/273/273176.xml
解决方案 »
- 一个 orecal 语句
- ORACLE8.17冷备份的问题,请教高手。
- 求助PL/SQL查询数据排序问题··············
- ORACLE返回CLOB大对象速度问题
- 一台Server能同时支持9i的INet和10G的INet Connection么?
- oracle赋值给变量出错!!!! 高手们请进!!!!!!!!
- 我使用<oracle9i>< pl/sql >出现了ORA-03113: 通信通道的文件结束
- 请问以下更新语句应怎么写
- ★★★★★救急啊!!!ora_01013:user requested cancel of current operation是怎么回事??ODBC连接Oracle数据库。Open表的时候出错。
- Oracle 去重统计样本数
- ORACLE中取前10条记录的SQL语句是什么?
- 求星期几的sql写法
索引表(index-by table)
type tabletype is table of type index by binary_integer; 定义类型
array_var tabletype ; 定义变量
嵌套表(nested table)
type tabletype is table of type;
array_var tabletype ; 变长数组
type type_name is {varray|varying array}{maximun-size} of element_type [NOT NUll];
array_var type_name;
a a_array;
inx pls_integer;
begin
--initialize the index into the array
inx := 0;
--initialize the array
a := a_array();
inx := inx + 1;
a.extend();
...............
Type <类型名> Is
Table Of <数据类型>
Index by Binary_Integer;
以下为一个例子:
Declare
Type Array_type is
Table Of Number
Index by Binary_Integer;
My_Array Array_type;
Begin
For I In 1..10 Loop
My_Array(I) := I*2;
End Loop;
For I In 1..10 Loop
Dbms_Output.Put_line(To_char(My_Array(I)));
End Loop;
End;
Type <类型名> Is
Table Of <数据类型>
Index by Binary_Integer;
以下为一个例子:
Declare
Type Array_type is
Table Of Number
Index by Binary_Integer;
My_Array Array_type;
Begin
For I In 1..10 Loop
My_Array(I) := I*2;
End Loop;
For I In 1..10 Loop
Dbms_Output.Put_line(To_char(My_Array(I)));
End Loop;
End;