问题
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';
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?
回答1:
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.
See also:
- http://www.dba-oracle.com/t_blob.htm
- http://www.dba-oracle.com/t_table_blob_lob_storage.htm
来源:https://stackoverflow.com/questions/10137992/how-to-interpret-all-tab-cols-data-length-4000-for-oracles-clob-types