T-SQL Tutorial

Smallint - TSQL Tutorial


On Transact SQL language the smallint is an numeric data type. Here you can read about max value and find an simple example.

Smallint syntax:

RangeStorage
-2^15 (-32,768) to 2^15-1 (32,767)2 Bytes

Smallint example:

USE model;
GO
CREATE TABLE mySmallintTable ( c smallint );
GO
INSERT INTO mySmallintTable VALUES (32767);
GO
SELECT c FROM mySmallintTable;
GO

Results
32767