What is the difference between varchar and nvarchar?

后端 未结 19 2154
野的像风
野的像风 2020-11-22 04:05

Is it just that nvarchar supports multibyte characters? If that is the case, is there really any point, other than storage concerns, to using varchars

19条回答
  •  死守一世寂寞
    2020-11-22 04:12

    Mainly nvarchar stores Unicode characters and varchar stores non-Unicode characters.

    "Unicodes" means 16-bit character encoding scheme allowing characters from lots of other languages like Arabic, Hebrew, Chinese, Japanese, to be encoded in a single character set.

    That means unicodes is using 2 bytes per character to store and nonunicodes uses only one byte per character to store. Which means unicodes need double capacity to store compared to non-unicodes.

提交回复
热议问题