Large Object data types LONG BINARY and BLOB

Binary Large Object (BLOB) data in Sybase IQ is stored in columns of data type LONG BINARY or BLOB.

NoteExisting LONG BINARY columns created using any Sybase IQ release prior to Sybase IQ 12.5 ESD8 are not supported. All existing LONG BINARY columns must be explicitly dropped before installing Sybase IQ 12.6, then recreated after installing Sybase IQ 12.6. The Sybase IQ 12.6 ALTER DATABASE UPGRADE command does not upgrade LONG BINARY columns created prior to Sybase IQ 12.5 ESD8. For details on upgrading LONG BINARY columns, see Appendix A, “Upgrading existing LONG BINARY columns.”

LONG BINARY columns created using Sybase IQ 12.5 ESD8 or a later version do not require a special upgrade procedure. Keep in mind, however, that if the server is not licensed for the LOB component, the CREATE TABLE and ALTER TABLE ADD column commands with a LONG BINARY column are not allowed and return the error “Large Objects Management functionality is not licensed on this server.”

An individual LONG BINARY data value can have a length ranging from zero (0) to 512TB (terabytes) for an IQ page size of 128KB or 2PB (petabytes) for an IQ page size of 512KB. (The maximum length is equal to 4GB multiplied by the database page size.) The IQ database must be created with an IQ page size of at least 128KB (131072 bytes) in order to accommodate a table with LONG BINARY data.

A table or database can contain any number of LONG BINARY columns up to the supported maximum columns per table and maximum columns per database, respectively.

LONG BINARY columns can be either NULL or NOT NULL and can store zero-length values. The domain BLOB is a LONG BINARY data type that allows NULL.

There are no implicit data type conversions from the LONG BINARY data type to another non-LONG BINARY data type. There are implicit conversions to LONG BINARY data type from TINYINT, SMALLINT, INTEGER, UNSIGNED INTEGER, BIGINT, UNSIGNED BIGINT, CHAR, and VARCHAR data types. There are no implicit conversions from BIT, REAL, DOUBLE, or NUMERIC data types to LONG BINARY data type.

No explicit data type conversions (for example, using the CAST or CONVERT function) exist either to or from the LONG BINARY data type.

A non-FP index or join index cannot be constructed on a LONG BINARY column.

A LONG BINARY column can be modified using the UPDATE, INSERT, LOAD TABLE, DELETE, TRUNCATE, SELECT...INTO and INSERT...LOCATION SQL statements. Positioned updates and deletes are not supported on LONG BINARY columns.

An Adaptive Server Enterprise IMAGE column can be inserted into a LONG BINARY column using the INSERT...LOCATION command. All IMAGE data inserted is right truncated at 32767 bytes.