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:

In addition, the following table lists items for which your ability to specify the BINARY type changes depending on its defined length.

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

ItemDefined length
1 to 255256 to 32,00032,001 to 2,147,483,647
SortingYYN
GroupingYYN
Set functionYYN
Search conditionYYN
Data insertion/updating#1YYY
Duplicate eliminationYYN
Set operationsYYN
Concatenation operationYYY#2
Scalar functionsYYY#3
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 defined 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 defined 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.