Data Types in SQL Server

In sql, data type is an attribute which is used to specify a type of data the column can hold like numeric type, character type, binary type, date and time type, etc. 

 

Generally, we will define a column datatype while creating a table like as shown below. In sql, we have a different ways to declare a columns in table like through CREATE TABLE statement or directly creating a table in database in sql server management studio.

SQL Create Columns using Create Table Statement

CREATE TABLE SampleTable

(

UserId INT,

UserName VARCHAR(50),

Education VARCHAR(50),

Salary FLOAT

)

SQL Management Studio Create Columns in Table

SQL Server Table Columns with Different Data Types

 

In sql server, we have a different type of data types available, those are 

 

Topics Covered