How can I read blob data in Oracle SQL Developer. It is stored in byte[] format. Is there any possibility to read in string format.
You can read BLOB value (binary data) from a table using the getBinaryStream() or, getBlob() methods of the ResultSet interface. These methods accept an integer value representing the index of the required column (or, a String value representing its name) and, reads CLOB data from it.
Follow these steps in Oracle SQL Developer
-
Update
OP says "text is not understandable manner it is showing �� �� like this "
Probably, the locale-specific NLS characterset doesn't support those characters. It might also be that those are Multi-Byte characters. I would suggest, SPOOL
the result to an HTML
file, open it with your browser
, you could view the content as most of the browsers are capable of displaying multiple charactersets.
You could do something like this from SQL*Plus -
SET MARKUP HTML ON SPOOL ON
SPOOL report.html
select substr(clob_column, 1, 32767) from table_name...
SPOOL OFF
Update 2
Regarding SPOOL as HTML, test case -
SET MARKUP HTML ON SPOOL ON
SPOOL D:\report.html
SELECT substr(ename, 1, 5) ename FROM emp where rownum <=5;
SPOOL OFF
Works perfectly for me, html file opens up with my browser, look at the screenshot -
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With