且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Oracle SQL Developer中查看Blob数据

更新时间:2022-12-03 11:12:08

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 -