Nonstop Database, HiRDB Version 9 SQL Reference

[Contents][Index][Back][Next]

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

Item Defined length
1 to 255 256 to 32,000 32,001 to 2,147,483,647
Sorting Y Y N
Grouping Y Y N
Set function Y Y N
Search condition Y Y N
Data insertion/updating#1 Y Y Y
Duplicate elimination Y Y N
Set operations Y Y N
Concatenation operation Y Y Y#2
Scalar functions Y Y Y#3
CASE expression Y Y N
CAST specification Y Y N

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.