Inserting data into an Oracle Database -


can please have insert data table.

i have created peripheral_objtyp object , created table object:

create type peripheral_objtyp object ( periphno number, comp_ref ref computer_objtyp, periphname varchar2(20), periphtype varchar2(20) ) /  create table peripheral_objtab of peripheral_objtyp (periphno primary key) object id primary key / 

here computer_objtyp:

create type computer_objtyp object ( compno          number, compname    varchar2(20), compos      varchar2(20), compprocessor   varchar2(20), compram     varchar2(20), currentuser_obj     currentuser_objtyp, harddrivelist_var   harddrivelist_vartyp ) / 

i wnat insert data peripheral_objtab. code have tried:

insert peripheral_objtab select 1, ref(c), 'test', 'test' computer_objtab c c.compno = 1; 

i getting error:

 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 insert object view ref or user-defined ref in            ref column created store system generated ref values" *action:   make sure ref inserted not object view            or user-defined ref column  

edit

i have tried following:

create table peripheral_objtab of peripheral_objtyp (periphno primary key) object identifier system generated / 

i same error however.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -