I have an oracle table with field type BLOB, length 4000, data type "2004". I know that this field simply contains some XML. How can I read the value of the BLOB, using an SQL select statement? Is there some conversion function to use? The same table/field in Sql Server is simply text.

  • Why is this a BLOB (binary) column in Oracle and a text column in SQL Server?
    – user1822
    Oct 14, 2011 at 21:55

1 Answer 1


This oracle package will do the job

select dbms_lob.substr(b,2000,1) from blobtest;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.