Oracle CLOB Tools - Import, Export, View and Edit

In Oracle, CLOB (Character Large Object) is a data type used to store large amounts of character – based data. More: Oracle CLOB.

Oracle CLOB - type family and size limits

Type in OracleMaximum size
CLOBup to (4 GB - 1) x db_block_size, counted in characters
NCLOBnational character set variant
LONGdeprecated - do not use

CLOB versus BLOB in Oracle

Oracle is the only engine here that really has types named `BLOB` and `CLOB`. BLOB counts bytes and CLOB counts characters under the database character set. The theoretical ceiling is enormous - roughly 32 TB with 8 KB blocks - so something else will stop you first.

What limits you first

The theoretical limit is far away, but a single INSERT is bounded by PGA memory and round trips: you must obtain an EMPTY_BLOB() locator and append with DBMS_LOB in chunks rather than sending the whole value at once.

CLOB from the command line

Things that bite with CLOB in Oracle