create type t1 as object (id int , name varchar2(10));create type va as varray(100) of t1;
create table tab ( no int , column1 va );然后里面插入了一条数据
no va(t1(id ,name )) 1 va(t1 (1,'1111'))
我现在想更新这条数据让添加一个 t1(2,'2222')
变成
1 va( t1(1,'1111',t1(2,'2222')))
即在原来的基础上添加一条数据, 一定要在原来的基础上,
create table tab ( no int , column1 va );然后里面插入了一条数据
no va(t1(id ,name )) 1 va(t1 (1,'1111'))
我现在想更新这条数据让添加一个 t1(2,'2222')
变成
1 va( t1(1,'1111',t1(2,'2222')))
即在原来的基础上添加一条数据, 一定要在原来的基础上,
p_t1:=t1(2,'2222');
p_va.extend(p_t1);
update tab set column1=p_va where ...;
commit;
建一个function(va, t1) return va可能更方便吧
update tab set column1=func(column1,t1(...)) where ...
大概是这个意思,没试过