CLOB data type

The CLOB data type stores any kind of text data in random-access chunks, called sbspaces. Text data can include text-formatting information, if this information is also textual, such as PostScript™, Hypertext Markup Language (HTML), Standard Graphic Markup Language (SGML), or Extensible Markup Language (XML) data.

The term smart large object refers to CLOB and BLOB data types. The CLOB data type supports special operations for character strings that are inappropriate for BLOB values. A CLOB value can be up to 4 terabytes (4*240 bytes) in length. The minimum amount of disk space allocated for smart large object data types is 512 bytes.

Use the BLOB data type (see BLOB data type) for random access to binary data. For general information about the CLOB and BLOB data types, see Smart large objects.

The following SQL functions can perform operations on a CLOB column:
  • FILETOCLOB copies a file into a CLOB column.
  • LOTOFILE copies a CLOB (or BLOB) value into a file.
  • LOCOPY copies a CLOB (or BLOB) value to a new smart large object.
  • ENCRYPT_DES or ENCRYPT_TDES creates an encrypted BLOB value from a plain-text CLOB argument.
  • DECRYPT_BINAR or DECRYPT_CHAR returns an unencrypted BLOB value from an encrypted BLOB argument (that ENCRYPT_DES or ENCRYPT_TDES created from a plain-text CLOB value).

For more information about these SQL functions, see the HCL OneDB™ Guide to SQL: Syntax.

No casts exist for CLOB data. Therefore, the database server cannot convert data of the CLOB type to any other data type, except by using these encryption and decryption functions to return a BLOB.Therefore, the database server cannot convert data of the CLOB type to any other data type. Within SQL, you are limited to the equality ( = ) comparison operation for CLOB data. To perform additional operations, you must use one of the application programming interfaces from within your client application.