Explicit lld_lob casts

The example in the following figure shows how to select large objects of type BLOB and CLOB from a table and how to copy them to a file.

This example uses the slobs table created in Implicit lld_lob casts.
Figure 1: Explicit lld_lob casts
--Explicitly cast from lld_lob to blob/clob
select slo::blob from slobs where key = 1;


(expression)  <SBlob Data>


select slo::clob from slobs where key = 2;


(expression)  
Ask not what your country can do for you,
but what you can do for your country.

The first SELECT statement retrieves the data in the slo column associated with key 1 and casts it as BLOB type data. The second SELECT statement retrieves the data in the slo column associated with key 2 and casts it as CLOB type data.