Create_CLOB_BLOB2.htm
 
Script:

CREATE TABLE testlob1 (
key NUMBER,
description varchar2(50),
test_clob1 CLOB,
test_blob1 BLOB);

Script saved as

Insert Script :

INSERT INTO testlob1 (key,description, test_clob1, test_blob1)
VALUES (1001,'CLOB BLOB large Object1', 'This item belongs to John Doe', HEXTORAW('15Ad34Bc'));
INSERT INTO testlob1 (key,description, test_clob1, test_blob1)
VALUES (1002,'CLOB BLOB large Object2', 'This object belongs to Long John', utl_raw.cast_to_raw('SampleString'));

PHP Querying

select key, description,
DBMS_LOB.substr(test_clob1, 1000) clob1,
DBMS_LOB.substr(test_blob1, 1000) blob1
from testlob1 where key in( 1001, 1002)

Try this script

select key, description,
DBMS_LOB.substr(test_clob1, 1000) clob1,
UTL_RAW.CAST_TO_RAW(DBMS_LOB.SUBSTR(test_blob1, 1000,1)) blob1
from testlob1 where key in( 1001, 1002)