SQL Flow Field Guide

int, bigint, smallint, & tinyint (data type)

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

data type int, bigint, smallint, & tinyint

What changes

Input
none
Output or change
none

Syntax at a glance

bigint | int | smallint | tinyint

Work example

Store whole-number keys and counts within a chosen numeric range.

Pick the smallest range that safely covers expected growth and check arithmetic for overflow.

Check your work Integer division discards the fractional part unless an operand is converted to a decimal type.

Practice SQL

Open in SQL Flow
SELECT CAST(7 AS decimal(5,2)) / 2 AS decimal_result;

Open Microsoft Learn for full syntax, permissions, and details for your version.