如何为Oracle的CLOB类型解释ALL_TAB_COLS.DATA_LENGTH = 4000? [英] How to interpret ALL_TAB_COLS.DATA_LENGTH = 4000 for Oracle's CLOB types?

查看:134
本文介绍了如何为Oracle的CLOB类型解释ALL_TAB_COLS.DATA_LENGTH = 4000?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个包含CLOB的表时,报告CLOB列的DATA_LENGTH为4000:

When I create a table with a CLOB in it, the CLOB column is reported to have a DATA_LENGTH of 4000:

create table test (
  data clob
);

-- Returns 4000
select data_length from all_tab_cols
where table_name = 'TEST';

我该怎么解释?考虑到VARCHAR2的限制也是4000,这是否是一些向后兼容的调整?还是这表示我只能插入/更新长度为4000的字符串文字?是否在某处记录了 SYS.ALL_TAB_COLS 的这种行为? /p>

How can I interpret that? Is that some backwards-compatible tweak, considering that the limit for VARCHAR2 is also 4000? Or is this to indicate that I can only insert / update string literals of length 4000? Is this behaviour of SYS.ALL_TAB_COLS documented somewhere?

推荐答案

表空间中最多可以在线存储4000字节.如果CLOB的长度超过4000字节,则必须通过特殊功能将其存储在LOB存储区中或从中读取.

Up to 4000 bytes can be stored in-line in the tablespace. If the length of the CLOB exceeds 4000 bytes it must be stored in/readed from LOB storage area via special functions.

另请参阅:

  • http://www.dba-oracle.com/t_blob.htm
  • http://www.dba-oracle.com/t_table_blob_lob_storage.htm

这篇关于如何为Oracle的CLOB类型解释ALL_TAB_COLS.DATA_LENGTH = 4000?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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