Uses of INT data type
The INT data type is used for any columns with numerical data like ID, Integer Values, or Currency values without decimals. The INT data type is also used to create a column with a Primary Key in a table.
Example of INT datatype:
Below is an example of the INT data type (Student_ID) used to create a table column:
CREATE TABLE [dbo].[Students](
[Student_ID] [int] NULL,
[Student_Name] [varchar](50) NOT NULL,
[Grade] [char](1) NULL
) ON [PRIMARY]
GO
SQL Server INT Data Type
In SQL Server, while creating a table column we give different data types to represent the type of values stored in the column. For numerical whole numbers, we give INT data type for a column in a table. In this article let us discuss the INT data type, how it is used, and the different INT data types available in SQL Server.