|
可变数组有助于在单个行中存储和重复记录的属性。
数据与表中的其它数据是存储在一起的,有限数目的行,不能被索引
创建可变数组的语法是:
create type array1 as varray(5) of varchar2(5)
向可变数组中插入记录
Insert into test1 values ('2ee', array1('1','2','3','4','5') )
Select * from test1 结果集如下
2ee
'1','2','3','4','5'
Select col2 from test1 结果集如下
'1','2','3','4','5'
Select * from table(select t.col2 from test1 where col1='2ee'); 结果集如下
1
2
3
4
5
|
|