Reputation: 77
I'm using the following code to create a type INFOS as object :
create or replace TYPE INFOS AS OBJECT
(
NAME VARCHAR2(50 BYTE),
PICTURE BLOB
)
and the table CLIENT that use the type INFOS:
create table client
(
ID_CLIENT int not null primary key,
INFORMATIONS INFOS
)
code inserting :
insert into client values(1,INFOS('john',EMPTY_BLOB()))
I could not return the column INFO.PICTURE into a variable.
so, how I can insert a BLOB data into this table.
Upvotes: 2
Views: 2592
Reputation: 23727
declare
i infos;
b blob;
begin
insert
into client
values(1, INFOS('John', EMPTY_BLOB()))
returning informations into i;
b := i.picture;
-- You can use b here
end;
Upvotes: 4