Implicit lld_lob casts
create table slobs (key int primary key, slo lld_lob);
--Insert binary and text large objects into an lld_lob field
--Implicitly cast from blob/clob to lld_lob
insert into slobs values (1, filetoblob ('logo.gif', 'client'));
insert into slobs values (2, filetoclob ('quote1.txt', 'client'));
select * from slobs;
key 1
slo blob:00608460a6b7c8d900000002000000030000000200000018000000000001000000608
460736c6f000010029a2a6c92070000000000006c000af0cdd900000080006082500af0c9d
e
key 2
slo clob:00608460a6b7c8d900000002000000030000000300000019000000000001000000608
460736c6f000010029a2a6c930d0000000000006c000af0cdd900000016000000010af0c9d
e
The slobs table, created in this example, contains the slo column, which is of type lld_lob. The first INSERT statement uses the filetoblob function to copy a binary large object to a smart large object. There exists an implicit cast from a BLOB type to an lld_lob type, so the INSERT statement can insert the BLOB type large object into an lld_lob type column.
Likewise, there is an implicit cast from a CLOB type to an lld_lob type, so the second INSERT statement can insert a CLOB type large object into the slo column of the slobs table.
The SELECT statement returns the lld_lob types that identify the two smart large objects stored in the slobs table.
The slo column for key 1 contains an instance of an lld_lob type that identifies the data as BLOB data and contains a hexadecimal number that points to the location of the data.
The slo column for key 2 identifies the data as CLOB data and contains a hexadecimal number that points to the location of the data.