查询BLOB字段的长度

oracle中:

  1. select  dbms_lob.getLength(zp)  from  kk.kkbj     

select dbms_lob.getLength(zp) from kk.kkbj

也可以在后边加where条件

这条语句可以查看kk.kkbj表中类型为blob的zp这个字段

在sql plus里执行这条语句的效果是这样的

Sql代码
  1. SQL>   select  dbms_lob.getLength(zp)  from  kk.kkbj  ;    

SQL> select dbms_lob.getLength(zp) from kk.kkbj ;

DBMS_LOB.GETLENGTH(ZP)
----------------------
                                97548
                                32943
                                30213

SQL>

查到了3条blob记录的大小

HSQLDB:

BIT_LENGTH

BIT_LENGTH ( <string value expression> )

BIT_LENGTH can be used with character, binary and bit strings. It return a BIGINT value that measures the bit length of the string. (Foundation)

See also CHARACTER_LENGTH and OCTET_LENGTH.

原文地址:https://www.cnblogs.com/duanxz/p/2859709.html