create table test(
a varchar2(10),
b nested_tab_test
) nested table b store as test1;
insert into test(a,b) values('aaa', nested_tab_test());
insert into table (select b from test where a='aaa') values('a01');
insert into test
select 'aaa', cast(multiset(select a from test2) as nested_tab_test)
from dual;
核心在於掌握 **插入巢狀表對應的型別物件**,使用 cast(multiset(...)) 將查詢結果轉型為巢狀表型別。