Character Types in Sql Server

Character Types

String DataTypes of either fixed length or variable length

1) Char[(n)]

   Fixed length,non unicode string data.where n defines the string length and must be value from 1 to 80000
   The storage size is n bytes

2) Varchar [(n|MAX)]

   variable length non unicode string data,where 'n' defines the string length and can be a value from 1 to 8000.Max indicates the maximum storage size is 2^31-1 bytes    (2 GB).The storage size here is the actual length of the data the entered + 2 bytes.

3) text

   Same as varchar(max)

4) nchar[(n)]

   Fixed length,unicode string data.where n defines the string length and must be value from 1 to 40000
   The storage size is two times n bytes

5) nvarchar[(n|max)]

      variable length  unicode string data,where 'n' defines the string length and can be a value from 1 to 4000.Max indicates the maximum storage size is 2^31-1 bytes (2 GB).The storage size here is the two times the actual length of the data the entered + 2 bytes.

3) ntext

   Same as nvarchar(max)
About Author: author 4 + years of Information Technology experience in understanding and analyzing the software and hardware engineering requirements, onsite and offshore management of product development. Expert work on design and development for windows,web,mobile Expert knowledge of C#,ADO.NET, ASP.Net MVC, ENTITY FRAMEWORK, LINQ,COLLECTIONS, JAVASCRIPT,AngularJs 1.0,Angular2, Jquery,Jquery-Ajax, SQL SERVER, XAML,Windows phone 8.1 Good knowledge of WCF-Restful services,WCF, WEB API-Services ,Web- Services,MIcrosoft-Azure,JUICE UI,HTML,CSS,AJAX Read More...

Join him on Google+ | Facebook | Linkedin

No comments