mysql的clob字段_ORACLE clob字段整理

一、CLOB字段的业务说明:CLOB为字符LOB,是LOB

的一种。这种类型用于存储大量的文本信息,如XML

或者只是纯文本。这个数据类型需要进行字符集转换,也就是说,在获取时,这个字段中的字符会从数据库的字符集转换为客户的字符集,而在修改时会从客户的字符集转换为数据库的字符集。

二、官方解释:The CLOB

data type stores single-byte and multibyte character data. Both

fixed-width and variable-width character sets are supported, and

both use the database character set. CLOB objects can store up to

(4 gigabytes -1) * (the value of the CHUNK parameter of LOB

storage) of character data. If the tablespaces in your database are

of standard block size, and if you have used the default value of

the CHUNK parameter of LOB storage when creating a LOB column, then

this is equivalent to (4 gigabytes - 1) * (database block

size).

CLOB objects have full

transactional support. Changes made through SQL, the DBMS_LOB

package, or Oracle Call Interface (OCI) participate fully in the

transaction. CLOB value manipulations can be committed and rolled

back. However, you cannot save a CLOB locator in a PL/SQL or OCI

variable in one transaction and then use it in another transaction

or session.

三、CLOB字段在数据库中的结构:

a4c26d1e5885305701be709a3d33442f.png

1、创建Clob列的时候会创建相应的索引;

2、表上面clob列会存放类似于指针的东西;

3、通过索引指向存放LOB对象的段;

4、CHUNK的大小是ORACLE数据块的整数倍;

四、常用的CLOB查询语句

1、知道CLOB的名称,查找对应的表名、索引名称、占用空间

SELECT A.OWNER,A.TABLE_NAME,A.COLUMN_NAME,A.INDEX_NAME,b.SEGMENT_TYPE,b.bytes/1024/1034 SIZE_MB

FROM dba_lobs A,DBA_SEGMENTS B

WHERE A.SEGMENT_NAME=B.SEGMENT_NAME AND A.OWNER=B.OWNER AND A.SEGMENT_NAME='&NAME';

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

本文作者:JOHN

ORACLE技术博客:ORACLE

猎人笔记  数据库技术群:367875324 (请备注ORACLE管理 )

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值