Represents a signed binary integer value in the range -32768 to 32767.
where:
Syntax element … |
Specifies … |
attributes |
appropriate data type attributes, column storage attributes, or column constraint attributes. See “Core Data Type Attributes” on page 17 and “Storage and Constraint Attributes” on page 18 for specific information. |
SMALLINT values are stored as two bytes, with the least significant byte first.
The following table lists client representations for the SMALLINT data type.
Determining the application definitions and client data types is the responsibility of the application programmer.
Client CPU Architecture |
Client Representation |
IBM mainframe |
Two byte 16-bit signed 2’s complement binary number, most significant byte first. |
|
Two byte 16-bit signed 2’s complement binary number, most significant byte first. |
Intel |
Two byte 16-bit signed 2’s complement binary number, least significant byte first. |
For information on the default display format, see “Data Type Default Formats” on page 281.
In the following table definition, column DeptNo is a SMALLINT data type:
CREATE TABLE Departments
(DeptNo SMALLINT FORMAT '999' BETWEEN 100 AND 900
,ManagerName CHAR(26)
,ManagerID CHAR(9));