What is the difference between varchar and nvarchar?

后端 未结 19 2478
野的像风
野的像风 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条回答
  •  Happy的楠姐
    2020-11-22 04:10

    Since SQL Server 2019 varchar columns support UTF-8 encoding.

    Thus, from now on, the difference is size.

    In a database system that translates to difference in speed.

    Less size = Less IO + Less Memory = More speed in general. Read the article above for the numbers.

    Unless you have a very specific use-case go for varchar in UTF8 from now on!

提交回复
热议问题