Character strings data types

Character strings data types allow you to store either fixed-length (char) or variable-length data (varchar). The text data type can store non-Unicode data in the code page of the server.

Data TypeLower limitUpper limitMemory
char0 chars8000 charsn bytes
varchar0 chars8000 charsn bytes + 2 bytes
varchar (max)0 chars2^31 charsn bytes + 2 bytes
text0 chars2,147,483,647 charsn bytes + 4 bytes
What about Ü or Ň?

Unicode character string data types

Unicode character string data types store either fixed-length (nchar) or variable-length (nvarchar) Unicode character data.

Data TypeLower limitUpper limitMemory
nchar0 chars4000 chars2 times n bytes
nvarchar0 chars4000 chars2 times n bytes + 2 bytes
ntext0 chars1,073,741,823 char2 times the string length

Binary string data types

The binary data types stores fixed and variable length binary data.

Data TypeLower limitUpper limitMemory
binary0 bytes8000 bytesn bytes
varbinary0 bytes8000 bytesThe actual length of data entered + 2 bytes
image0 bytes2,147,483,647 bytes

Back to Data Types