Character Data Type

Character  data types are  string data types of either fired length or variable length.

 Char (n):

It is a fixed length data type, store the string values in non Unicode manner i.e.it will take 1 char per 1 byte. The maximum length of char data type is from 1-8000 bytes.

Varchar (n/max):

 It is a variable length data type, store the string values in non-Unicode manner i.e.it will take 1 char per 1 byte. The maximum length of Varchar data type is from 1-8000 bytes.

  Text:

 It is same as Varchar(max) data type.

 Nchar (n):

It is a fixed length data type, store the string values in Unicode manner i.e.it will take 1 char per 2 bytes. The maximum length of char data type is from 1-4000 bytes. The storage size is two times of n bytes.

Nvarchar (n/max):

It is a variable length data type, store the string values in Unicode manner i.e.it will take 1 char per 2 byte. The maximum length of char data type is from 1-4000 bytes

 Ntext:

It is same as Nvarchar (max) data type . Binary Data Type: Binary data types are used to store images, videos and audio data. These can be divided into the following types .

Binary types:

 Binary data type of either fixed length or variable  length for  storing binary values like images, audio and videos.

 Binary (n):

It is a fixed length data type. The maximum length of binary data type is 1-8000 bytes.

 Varbinary (n/max):

It is a variable length data type. The maximum length of binary data type is 1-8000 bytes.

 Image:

it is same as a Varbinary (max)

Note:

Instead of text, Ntext and image data types we are using Varchar (max), Nvarchar (max) and Varbinary (max) data types in latest versions of Microsoft SQL server.