Use smart large objects

To store columns of a BLOB or CLOB data type, you must allocate an sbspace. An sbspace is a logical storage unit that stores BLOB and CLOB data in the most efficient way possible. You can write programs that allow users to fetch and store BLOB or CLOB data. Application programmers who want to access and manipulate smart large objects directly can consult the HCL OneDB™ ESQL/C Programmer's Manual.

In any SQL statement, interactive or programmed, a BLOB or CLOB column cannot be used in the following contexts:
  • In arithmetic or Boolean expressions
  • In a GROUP BY or ORDER BY clause
  • In a LIKE or MATCHES condition
  • In a UNIQUE test
  • For indexing, as part of a B-tree index

    DataBlade® developers, however, can create indexes on CLOB columns.

In a SELECT statement entered interactively, a BLOB or CLOB column can:
  • Specify NULL values as a default when you create a table with the DEFAULT NULL clause
  • Disallow NULL values using the NOT NULL constraint when you create a table
  • Be tested with the IS [NOT] NULL predicate

From an ESQL/C program, you can use the ifx_lo_stat() function to determine the length of BLOB or CLOB data.