Posted By: Anonymous
I have been pretty much fascinated by these two data types. According to Oracle Docs, they are presented as follows :
BLOB : Variable-length binary large object string that can be up to 2GB (2,147,483,647) long. Primarily intended to hold non-traditional data, such as voice or mixed media. BLOB strings are not associated with a character set, as with FOR BIT DATA strings.
CLOB : Variable-length character large object string that can be up to 2GB (2,147,483,647) long. A CLOB can store single-byte character strings or multibyte, character-based data. A CLOB is considered a character string.
What I don’t know, is whether there is any difference between the two from DB2 and Oracle perspective? I mean, what are the differences between DB2 CLOB and Oracle CLOB, also between DB2 BLOB and Oracle BLOB? What is the maximum size of both in DB2 and Oracle? Is it just 2 GB ?
They can be considered as equivalent. The limits in size are the same:
- Maximum length of CLOB (in bytes or OCTETS)) 2 147 483 647
- Maximum length of BLOB (in bytes) 2 147 483 647
There is also the DBCLOBs, for double byte characters.
- LOB definition in DB2: http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0008473.html
- SQL and XML limits: http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0001029.html