1.2.6 Notes on using the BINARY type

Organization of this subsection
(1) Items in which the BINARY type cannot be used
(2) Using a locator

(1) Items in which the BINARY type cannot be used

The BINARY type cannot be used in any of the following items:

Table 1-8 shows items in which specifiable/not specifiable changes in a BINARY type definition length:

Table 1-8 Items in which specifiable/not specifiable changes in a BINARY type definition length

ItemDefinition length
1-255256-32,00032,001-2,147,483,647
SortingYYN
GroupingYYN
Set functionYYN
Search conditionYYN
Data insertion/updating1YYY
Duplicate eliminationYYN
Set operationsYYN
Concatenation operationYYY2
Scalar functionsYYY3
CASE expressionYYN
CAST specificationYYN
Legend:
Y: Can be used.
N: Cannot be used.
1 When specifying a literal in an update or insertion value for a BINARY-type column, you can specify only a hexadecimal character string literal.
2 BINARY-type concatenation operations with a maximum length of greater than or equal to 32,001 bytes can be used only on update values for the SET clause of the UPDATE statement.
3 The only scalar functions for which a BINARY type with a definition length of 32,001 bytes or greater can be specified are the LENGTH, SUBSTR, and POSITION functions; on other scalar functions, the BINARY type cannot be used with a definition length of 32,001 bytes or greater.

(2) Using a locator

When handling the BINARY type in a UAP, you can use a locator to allow you to process the SQL that handles BINARY type data without storing the data itself on a client. For a description of locators, see 1.13 Locator.