Manoranjan Gupta
What is Difference between char varchar and nvarchar in sql server?
By Manoranjan Gupta in SQL Server on Aug 12 2013
  • Ritesh Kumar Singh
    Jul, 2014 21

    https://www.blogger.com/blogger.g?blogID=2568354192478497009#editor/target=post;postID=5263135442337294453;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=0;src=postnamehttps://www.blogger.com/blogger.g?blogID=2568354192478497009#editor/target=post;postID=4182505362453291031;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=2;src=postname

    • 0
  • Munesh Sharma
    Apr, 2014 12

    http://www.aspdotnet-suresh.com/2012/07/difference-between-char-varchar-and.html

    • 0
  • Manoranjan Gupta
    Aug, 2013 12

    Char Datatype:

    Char datatype which is used to store fixed length of characters. Suppose if we declared char(50) it will allocates memory for 50 characters. Once we declare char(50) and insert only 10 characters of word then only 10 characters of memory will be used and other 40 characters of memory will be wasted.

    varchar DataType

    It will take the number of bytes equal to the number of characters stored in this column.

    Varchar means variable characters and it is used to store non-unicode characters. It will allocate the memory based on number characters inserted. Suppose if we declared varchar(50) it will allocates memory of 0 characters at the time of declaration. Once we declare varchar(50) and insert only 10 characters of word it will allocate memory for only 10 characters.

    nvarchar DataType

    nvarchar datatype same as varchar datatype but only difference nvarchar is used to store Unicode characters and it allows you to store multiple languages in database. nvarchar datatype will take twice as much space to store extended set of characters as required by other languages.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS