Oracle DB: Get BLOB field size in sql query

This is how to get the size of a BLOB in SQL query:

select file_id, doc_xml, dbms_lob.getlength(doc_xml) 
from my_files
order by dbms_lob.getlength(doc_xml) desc

Leave a Reply