The following example shows how to use the LLD_LobType function
to obtain the type of data—BLOB or CLOB—that an lld_lob column contains.
The slobs table
in this example is the same one created in Figure 1. That
example created the table and inserted a BLOB type large object for
key 1 and a CLOB type large object for key 2. Figure 1. The LLD_LobType function
-- LLD_LobType UDR
select key, lld_lobtype(slo) from slobs;
key (expression)
1 blob
2 clob
select slo::clob from slobs where lld_lobtype(slo) = 'clob';
(expression)
Ask not what your country can do for you,
but what you can do for your country.
The first SELECT statement returns:
1 blob
2 clob
indicating that the data associated with key 1
is of type BLOB and the data associated with key 2 is of type CLOB.
The
second SELECT statement uses LLD_LobType to retrieve
the columns containing CLOB type data. The second SELECT statement
casts the slo column (which is of type lld_lob) to retrieve
CLOB type data.