Below are details difference BLOB and CLOB :

Large object data types store data ranging in size from zero bytes to 2 gigabytes.

The three large object data types have the following definitions:

  • Character Large OBjects (CLOBs) : A character string made up of single-byte characters with an associated code page. This data type is appropriate for storing text-oriented information where the amount of information can grow beyond the limits of a regular VARCHAR data type (upper limit of 32K bytes). Code page conversion of the information is supported.
  • Double-Byte Character Large OBjects (DBCLOBs) : A character string made up of double-byte characters with an associated code page. This data type is appropriate for storing text-oriented information where double-byte character sets are used. Again, code page conversion of the information is supported.
  • Binary Large OBjects (BLOBs) : A binary string made up of bytes with no associated code page. This data type can store binary data larger than VARBINARY (32K limit). This data type is good for storing image, voice, graphical, and other types of business or application-specific data.

Note:

  • CLOB is encoding and collation sensitive, BLOB is not
  • When you write into a CLOB using, say, CL8WIN1251, you write a 0xC0 (which is Cyrillic letter А).
  • When you read data back using AL16UTF16, you get back 0x0410, which is a UTF16 represenation of this letter.
  • If you were reading from a BLOB, you would get same 0xC0 back.

Leave a Reply

Your email address will not be published. Required fields are marked *