October 8th, 2008

SMALLINT Data

Posted by admin in F. Data Types

SMALLINT is a data type that can only contain a relatively small, whole number.

 

Example:    COL1 SMALLINT

COL1 can only have an integer value from -32,768 to +32,767.

 

Notice that the keyword, SMALLINT, is a complete definition of the data type and has no value defined in parentheses. This is because SMALLINT limits the values in the column to the range shown above. See Sample Data Type Values.

For most DBMS systems, SMALLINT is an 16-bit value.

If TINYINT is an option, as in MySQL or SQL Server, then it typically is an 8-bit value from -256 to 255.

Comments are closed.

Sorry, the comment form is closed at this time.