Collection Contents Index Date and time data types User-defined data types pdf/chap7.pdf

Reference Manual
   CHAPTER 7. SQL Data Types     

Binary data types


Function 

For storing binary data, including images and other information that is not interpreted by the database.

Top of page  BINARY data type [Binary]

Function 

Binary data of a specified maximum length (in bytes).

Syntax 

BINARY [ ( max-length ) ]

Usage 

The default max-length is 1.

The maximum size allowed is 32,767. The BINARY data type is identical to the CHAR data type except when used in comparisons. BINARY values will be compared exactly while CHAR values are compared without respect to upper/lower case unless the database is defined as case-sensitive or accented characters.

Parameters 

max-length An integer expression that specifies the maximum length of the expression.

Standards and compatibility 

See also 

LONG BINARY data type

VARBINARY data type

Top of page  LONG BINARY data type [BINARY]

Function 

Arbitrary length binary data. The maximum size is limited by the maximum size of the database file (currently 2 gigabytes).

Syntax 

LONG BINARY

Usage 

The maximum size is limited by the maximum size of the database file (currently 2 gigabytes).

Standards and compatibility 

See also 

BINARY data type

VARBINARY data type

Top of page  IMAGE data type [BINARY]

Function 

LONG BINARY data allowing NULL.

Syntax 

IMAGE

Usage 

IMAGE is implemented in Adaptive Server Anywhere as a user-defined data type, as LONG BINARY allowing NULL. It is provided primarily for compatibility with Adaptive Server Enterprise.

Standards and compatibility 

Top of page  VARBINARY data type [BINARY]

Function 

Identical to BINARY.

Syntax 

VARBINARY [ ( n ) ]

Usage 

Variable length binary strings. The default value for n is one.

Standards and compatibility 

See also 

BINARY data type

LONG BINARY data type

Top of page  

Collection Contents Index Date and time data types User-defined data types pdf/chap7.pdf