EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 291

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 7 SQL Data Types
273
SQL/92 Compatible with SQL/92..
Sybase Compatible with Adaptive Server Enterprise.
SMALLINT data type [Numeric]
Integer value requiring 2 bytes of storage.
[ UNSIGNED ] SMALLINT
The SMALLINT data type is an exact numeric data type; its accuracy is
preserved after arithmetic operations. It requires 2 bytes of storage.
The range for signed SMALLINT values is from -32768 to + 32767.
The range for unsigned SMALLINT values is from 0 to 65535.
SQL/92 Compatible with SQL/92. The UNSIGNED keyword is a
vendor extension.
Sybase The signed data type is compatible with Adaptive Server
Enterprise. Adaptive Server Enterprise does not support the UNSIGNED
data type.
"INT or INTEGER data type" on page 271
"TINYINT data type" on page 273
"BIGINT data type" on page 268
TINYINT data type [Numeric]
Unsigned integer, requiring 1 byte of storage.
[ UNSIGNED ] TINYINT
The TINYINT data type is an exact numeric data type; its accuracy is
preserved after arithmetic operations.
You can explicitly specify TINYINT as UNSIGNED, but the UNSIGNED
modifier has no effect as the type is always unsigned.
The range for TINYINT values is from 0 to 255.
In Embedded SQL, TINYINT columns should not be fetched into variables
defined as
char
or
unsigned char
, since the result is an attempt to convert the
value of the column to a string and then assign the first byte to the variable in
the program. Instead, TINYINT columns should be fetched into 2-byte or 4-
byte integer columns. Also, to send a TINYINT value to a database, the C
variable type should be an integer.
Standards and
compatibility
Function
Syntax
Usage
Standards and
compatibility
See also
Function
Syntax
Usage

Table of Contents

Related product manuals