1. String Data Types
  2. Integer Data Types
  3. Date and Time Data Types

String Data Types in SQL

char(n) used to store string of fixed length (max 3000
varchar(n) used to store string of variable length
varchar(max)
nchar
nvarchar
text used to store string up to 2GB size
ntext
binary(n)
varbinary
image used to store binary string up to 2GB size

 

Integer Data Types in SQL

bit used to store single bit (0, 1 , NULL)
tinyint used to store number, from 0 to 225
Smallint used to store number, from -32,768 to 32,767
Int used to store number, from -2,147,483,648 to 2,147,483,647
bigint used to store number, from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
real
float(n)
money

Date and Time Data Types in SQL

datetime used to store date and time both, range from January 1, 1753, to December 31, 9999
datetime2 used to store date and time both, range from January 1, 0001 to December 31, 9999
date used to store date only, range from January 1, 0001 to December 31, 9999
time used to store time only,
timestamp
Sharing is Caring
Scroll to Top