Frage

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.

War es hilfreich?

Lösung

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;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top