如何在Oracle SQL Developer中查看Blob数据 [英] How to view blob data in Oracle SQL Developer
问题描述
如何在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
-
- 打开表格的数据窗口.
- BLOB单元将被命名为(BLOB).
- 右键单击该单元格.
- 您将看到一个铅笔图标.点击它.
- 它将打开一个 blob编辑器窗口.
- 您会在查看为:图像或文本选项中找到两个复选框.
- 选中相应的复选框.
- 如果上述步骤仍然令人信服,请使用下载选项.
- Open data window of your table.
- The BLOB cell will be named as (BLOB).
- Right click the cell.
- You will see a pencil icon. Click on it.
- It will open a blob editor window.
- You would find two check boxes against the option View as : Image or Text.
- Select the appropriate check box.
- 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屋!