3. Understanding SQL Data Types : SQL Data Types : Binary Data Types : Long Byte Data Types
 
Share this page                  
Long Byte Data Types
The long byte data type has the same characteristics as the byte varying data type, but can accommodate binary data up to 2 GB in length. In embedded SQL data handlers can be created, which are routines to read and write the data for long byte columns. For details about data handlers, see Data Handlers for Large Objects (see page Data Handlers for Large Objects) and the Embedded SQL Companion Guide.
Restrictions on Long Byte Columns
The following restrictions apply to long byte columns:
They cannot be part of a table key.
They do not declare a length
They cannot be part of a secondary index.
They cannot be used in the ORDER BY or GROUP BY clause of a SELECT statement.
They cannot have query optimization statistics. For details about query optimization statistics, see the optimizedb command in the Command Reference Guide.
The following string functions do not work with long byte columns:
LOCATE
PAD
SHIFT
SQUEEZE
TRIM
NOTRIM
CHAREXTRACT
BYTEEXTRACT
LEFT
RIGHT
SUBSTRING
They cannot be directly compared to other data types. To compare a long byte column to another data type, apply a coercion function.
A literal of more than 2000 bytes cannot be assigned to a long byte column. For details about assigning long values to long byte columns, see the description of data handlers in the Embedded SQL Companion Guide, Dynamic Programming (see page Dynamic Programming) in the chapter “Embedded SQL” or the OpenAPI User Guide.