Oracle - LOB Datatype

1 - About

LOB in Oracle

In Oracle, a LOB is simply a pointer that points to an index that is stored in a LOBINDEX segment. The index points to the chunks that make up the LOB that are stored in LOBSEGMENT segment.

  • See alsoOracle Database - DBMS_LOB Package
  • Maximum size: 16 TB
  • The use of the old LONG data type is deprecated.

3 - Type

3.1 - BLOB

Binary large object (BLOB): For unstructured binary data


--EMPTY_BLOB and EMPTY_CLOB return an empty LOB locator that can be used to initialize a LOB variable
blob := empty_blob();
-- From Varchar
blob := TO_BLOB(UTL_RAW.CAST_TO_RAW('abc'));

3.2 - CLOB

Character large object (CLOB): For character data


-- EMPTY_BLOB and EMPTY_CLOB return an empty LOB locator that can be used to initialize a LOB variable
clob := empty_clob();
-- To_clob
clob := to_clob('abc');

3.3 - BFILE

  • Binary file (BFILE): For external files

Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap