我有一个 C_table 和 M_table 并且 C_table 和 M_table 之间存在对 1 的关系,我也有 L_table 这是一个 C_table 类型,我正在尝试使用 oracle SQL Developer 使用 OODBMS。我有以下类型和表格:
create type C_table as object
(
se number(10),
sp number(10),
pr number(15),
me number(3),
ste S_type,
name ref M_type
)not final;
create type m_type as object
(
name varchar2(25),
add varchar(25)
);
type L_type under computer_type
(
w number(5)
);
我也创建了他们的表,现在我试图插入到 L_table 中,如下所示,我收到以下错误:
insert into l_tab select 500,2,1600,4, S_type('Ms','Me'), REF(d),1.5 from m_tab d where
d.name= 'Int';
SQL Error: ORA-22979: cannot INSERT object view REF or user-defined REF
22979. 00000 - "cannot INSERT object view REF or user-defined REF"
*Cause: Attempt to insert an object view REF or user-defined REF in a
REF column created to store system generated REF values"
*Action: Make sure the REF to be inserted is not from an object view
or from a user-defined REF column