Difference between tinyint, smallint, int and bigint data type in SQL Server

In the following table, you can see the difference between data types that use integer data in SQL Server (tinyint, smallint, int and bigint):

Data type: Minimum value: Maximum value: Storage:
tinyint 0 255 1 byte
smallint -2^15 (-32,768) 2^15-1 (32,767) 2 bytes
int -2^31 (-2,147,483,648) 2^31-1 (2,147,483,647) 4 bytes
bigint -2^63 (-9,223,372,036,854,775,808) 2^63-1 (9,223,372,036,854,775,807) 8 bytes
If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">