Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Why is this a BLOB (binary) column in Oracle and a text column in SQL Server? – a_horse_with_no_name Oct 14 '11 at 21:55

This oracle package will do the job

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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