dbms_lob.getlength()vs.length()在oracle中查找blob大小 [英] dbms_lob.getlength() vs. length() to find blob size in oracle

查看:352
本文介绍了dbms_lob.getlength()vs.length()在oracle中查找blob大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从

select length(column_name) from table

select dbms_lob.getlength(column_name) from table

但是,答案

However, the answers to this question seem to favor using dbms_lob.getlength().

使用dbms_lob.getlength()有什么好处吗?

如果它改变了答案,我知道所有blob都是.bmp图像(以前从未使用过blob).

If it changes the answer, I know all of the blobs are .bmp images (never worked with blobs before).

推荐答案

length

length and dbms_lob.getlength return the number of characters when applied to a CLOB (Character LOB). When applied to a BLOB (Binary LOB), dbms_lob.getlength will return the number of bytes, which may differ from the number of characters in a multi-byte character set.

由于文档中没有指定在BLOB上应用length时会发生什么,因此我建议不要在这种情况下使用它.如果需要BLOB中的字节数,请使用dbms_lob.getlength.

As the documentation doesn't specify what happens when you apply length on a BLOB, I would advise against using it in that case. If you want the number of bytes in a BLOB, use dbms_lob.getlength.

这篇关于dbms_lob.getlength()vs.length()在oracle中查找blob大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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