int, bigint, smallint, & tinyint (data type)
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 FlowSELECT CAST(7 AS decimal(5,2)) / 2 AS decimal_result;
Open Microsoft Learn for full syntax, permissions, and details for your version.