I’m getting the same results from
select length(column_name) from table
as from
select dbms_lob.getlength(column_name) from table
However, the answers to
this question seem to favor using dbms_lob.getlength().
Is there any benefit to using dbms_lob.getlength()?
If it changes the answer, I know all of the BLOBs are .bmp images (never worked with BLOBs before).
lengthanddbms_lob.getlengthreturn the number of characters when applied to a CLOB (Character LOB). When applied to a BLOB (Binary LOB),dbms_lob.getlengthwill return the number of bytes, which may differ from the number of characters in a multi-byte character set.As the documentation doesn’t specify what happens when you apply
lengthon a BLOB, I would advise against using it in that case. If you want the number of bytes in a BLOB, usedbms_lob.getlength.