Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> pl/sql: insert a type-object into a table
hi,
i have e.g. the this type-object and the table to store it:
CREATE TYPE test_t AS OBJECT (a number, b number);
CREATE TABLE test_items OF test_t;
now i want to save an instance of the object test_t into this table. i tried it with the following pl/sql-code:
[...]
as
myObject test_t;
begin
[...]
myObject := new test_t('1','2');
[...]
INSERT INTO test_items VALUES (myObject); -- <== not working
[...]
end;
this was not working! :-( do you have any idea how I have to write my insert-statement?
thanks for helping!