Restrictions using LOBs

With a few exceptions, you can use LOBs in the same contexts in which you can use other varying-length strings.

The following table shows the contexts in which LOBs cannot be used.

Table 1. Contexts in which LOBs cannot be used
Context of usage LOB (CLOB, DBCLOB, or BLOB)
A GROUP BY clause Not allowed
An ORDER BY clause Not allowed
Start of changeA CREATE INDEX statement that creates an index using an expressionEnd of change Start of changeNot allowed except when the index is created using an expression, in which case an inline LOB column can be referenced as the source data type for the SUBSTR and SUBSTRING built-in functions.End of change
A SELECT DISTINCT statement Not allowed
A MERGE statement Cannot be used in the context of an INCLUDE column-name clause
A subselect of a set operation except UNION ALL Not allowed
Predicates Cannot be used in any predicate except EXISTS, LIKE, and NULL. This restriction includes a simple-when-clause in a CASE expression. expression WHEN expression in a simple-when-clause is equivalent to a predicate with expression=expression.
The definition of primary, unique, and foreign keys Not allowed
Check constraints Not allowed