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
textused to store string up to 2GB size
ntext
binary(n)
varbinary
imageused to store binary string up to 2GB size

 

Integer Data Types in SQL

bitused to store single bit (0, 1 , NULL)
tinyintused to store number, from 0 to 225
Smallintused to store number, from -32,768 to 32,767
Intused to store number, from -2,147,483,648 to 2,147,483,647
bigintused 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

datetimeused to store date and time both, range from January 1, 1753, to December 31, 9999
datetime2used to store date and time both, range from January 1, 0001 to December 31, 9999
dateused to store date only, range from January 1, 0001 to December 31, 9999
timeused to store time only,
timestamp
Sharing is Caring
Load WordPress Sites in as fast as 37ms!
Scroll to Top