To continue reading for free, register below or login
To read more you must become a member of SearchOracle.com
');
// -->

I have a table called DEMO. It has a field called THEBLOB which has a datatype of BLOB. Using the package DBMS_LOB and its procedure GETLENGTH, I can find the length of the blob. See my example below. Also, note that I have several types of files inserted: PDF, MSWORD, BMP and JPEG.
SQL> desc scott.demo
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
THEBLOB BLOB
FILE_NAME VARCHAR2(50)
CENTER_ID VARCHAR2(5)
MIMI_TYPE VARCHAR2(20)
THELONG LONG RAW
SQL> l
1 select substr(file_name,1,20) Name, MIMI_TYPE, dbms_lob.GETLENGTH(theblob)
2* from scott.demo
SQL> /
NAME MIMI_TYPE DBMS_LOB.GETLENGTH(THEBLOB)
-------------------- -------------------- ---------------------------
Design and Construct application/pdf 682183
Lease Agreement - 18 application/pdf 2301417
Agreement in Princip application/pdf 353304
User Manual application/MSWORD 1089536
unknown
Job Corps.bmp image/bmp 64062
01-New VST Retail Sa image/jpeg 89525
Agreement in Princip application/pdf 353304
Design and Construct application/pdf 682183
Lease Agreement - 18 application/pdf 2301417
10 rows selected.
SQL> spool off;
|