What is the difference between varchar and nvarchar?

后端 未结 19 2163
野的像风
野的像风 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条回答
  •  梦毁少年i
    2020-11-22 04:31

    nvarchar is safe to use compared to varchar in order to make our code error free (type mismatching) because nvarchar allows unicode characters also. When we use where condition in SQL Server query and if we are using = operator, it will throw error some times. Probable reason for this is our mapping column will be difined in varchar. If we defined it in nvarchar this problem my not happen. Still we stick to varchar and avoid this issue we better use LIKE key word rather than =.

提交回复
热议问题