如何在Oracle SQL Developer中查看Blob数据 [英] How to view blob data in Oracle SQL Developer

查看:1269
本文介绍了如何在Oracle SQL Developer中查看Blob数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Oracle SQL Developer中读取blob数据.它以byte []格式存储.有可能以字符串格式读取.

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.

推荐答案

Oracle SQL Developer-

  1. 打开表格的数据窗口.
  2. BLOB单元将被命名为(BLOB).
  3. 右键单击该单元格.
  4. 您将看到一个铅笔图标.点击它.
  5. 它将打开一个 blob编辑器窗口.
  6. 您会在查看为:图像或文本选项中找到两个复选框.
  7. 选中相应的复选框.
  8. 如果上述步骤仍然令人信服,请使用下载选项.
  1. Open data window of your table.
  2. The BLOB cell will be named as (BLOB).
  3. Right click the cell.
  4. You will see a pencil icon. Click on it.
  5. It will open a blob editor window.
  6. You would find two check boxes against the option View as : Image or Text.
  7. Select the appropriate check box.
  8. If above step is still convincing, then use the Download option.

更新

OP说"文本无法理解,它像这样显示 "

特定于语言环境的NLS字符集可能不支持这些字符.也可能是多字节字符.我建议将结果SPOOL保存为HTML文件,并用browser打开它,因为大多数浏览器都能够显示多个字符集,因此您可以查看内容.

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.

您可以通过SQL * Plus执行类似的操作-

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

更新2

关于SPOOL作为HTML,测试用例-

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

对我来说完美地工作,用我的浏览器打开html文件,查看屏幕截图-

Works perfectly for me, html file opens up with my browser, look at the screenshot -

这篇关于如何在Oracle SQL Developer中查看Blob数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆